:py:mod:`raesl.doc.lines` ========================= .. py:module:: raesl.doc.lines .. autoapi-nested-parse:: Module to generate text lines that describe ESL objects. Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: raesl.doc.lines.Hookspecs Functions ~~~~~~~~~ .. autoapisummary:: raesl.doc.lines.hs raesl.doc.lines.header raesl.doc.lines.boldhead raesl.doc.lines.emph raesl.doc.lines.cap raesl.doc.lines.bold raesl.doc.lines.snt raesl.doc.lines.ordered raesl.doc.lines.unordered raesl.doc.lines.image raesl.doc.lines.node_path raesl.doc.lines.bundle_path raesl.doc.lines.var_path raesl.doc.lines.var_clarification raesl.doc.lines.bundle_clarification raesl.doc.lines.component_node raesl.doc.lines.lines raesl.doc.lines.get_design_rule_line_vars Attributes ~~~~~~~~~~ .. autoapisummary:: raesl.doc.lines.LineGen raesl.doc.lines.hook raesl.doc.lines.kind_mapping .. py:data:: LineGen .. py:class:: Hookspecs .. py:method:: linguistic_enumeration() -> str Get a natural language enumeration of items. .. py:method:: linguistic_options() -> str Get a natural language enumeration of options. .. py:method:: function_spec_node(graph: ragraph.graph.Graph, html: bool) -> LineGen Yield the function spec in natural language. .. py:method:: design_spec_node(graph: ragraph.graph.Graph, html: bool) -> LineGen Yield the design spec in natural language. .. py:method:: behavior_spec_node(graph: ragraph.graph.Graph, html: bool) -> LineGen Yield the behavior spec in natural language. .. py:method:: need_node(graph: ragraph.graph.Graph, html: bool) -> LineGen Yield the need spec in natural language. .. py:data:: hook .. py:function:: hs(h: int) Get header pound (#) signs. .. py:function:: header(h: int, text: str, capitalize: bool = True, html: bool = False) -> str Get a header with surrounding whitespace and optional capitalization. .. py:function:: boldhead(text: str, capitalize: bool = True, newlines: bool = True, html: bool = False) -> str Get a bold header (without numbering) with surrounding whitespace. .. py:function:: emph(text: str, html: bool = False) -> str Return text as emphasized (Markdown or html). .. py:function:: cap(text: str) -> str Capitalize first char of text. .. py:function:: bold(text: str, html: bool = False) -> str Return text as bold (markdown or html). .. py:function:: snt(text: str) -> str Text to a sentence. Capitalizes first character and adds a period. .. py:function:: ordered(items: Iterable[str], indent: int = 0, html: bool = False) -> LineGen Generate an ordered Markdown or html list. .. py:function:: unordered(items: Iterable[str], indent: int = 0, html: bool = False) -> LineGen Generate an unordered Markdown or html list. .. py:function:: image(path: str, caption: Optional[str] = None, label: Optional[str] = None, sizing: Optional[str] = None) -> str Get Pandoc Markdown for an image. .. py:function:: node_path(path: str, italic: bool = False, arrows: bool = True, skip: str = 'world') Get a friendly representation of a node path. .. py:function:: bundle_path(path: str, root: str, italic: bool = False, arrows: bool = True, skip: str = 'world') Get a friendly representation of a bundle path. .. py:function:: var_path(v: ragraph.node.Node, italic: bool = False, arrows: bool = True, skip: str = 'world') Get a friendly representation of a variable path. .. py:function:: var_clarification(bvars: List[ragraph.node.Node], html: bool = False) Yield variable clarification section. .. py:function:: bundle_clarification(brvdict: Dict[str, List[ragraph.node.Node]], html: bool = False) Yield bundle clarification section .. py:function:: component_node(node: ragraph.node.Node, h: int) -> LineGen Yield component section .. py:data:: kind_mapping .. py:function:: lines(node: ragraph.node.Node, **kwargs) -> LineGen Yield lines that describes a Node. :param node: Node to generate the lines from. .. py:function:: get_design_rule_line_vars(rules: List[Dict[str, str]], g: ragraph.graph.Graph) Get variables that are used within a design rule line