:py:mod:`raesl.doc.doc` ======================= .. py:module:: raesl.doc.doc .. autoapi-nested-parse:: Document module. Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: raesl.doc.doc.Doc raesl.doc.doc.Par Functions ~~~~~~~~~ .. autoapisummary:: raesl.doc.doc.get_bundle_root Attributes ~~~~~~~~~~ .. autoapisummary:: raesl.doc.doc.TEMPLATES .. py:data:: TEMPLATES .. py:class:: Doc(*paths: Union[str, pathlib.Path], language: str = 'en', prologue: Optional[pathlib.Path] = None, epilogue: Optional[pathlib.Path] = None, goal_section: [bool] = True, transformation_section: [bool] = True, behavior_section: [bool] = True, design_section: [bool] = True, need_section: [bool] = True, relation_section: [bool] = True, var_table: [bool] = True, rich: Optional[str] = 'tex', rich_opts: Optional[Dict[str, Any]] = None, esl_paths: Optional[Union[List[str], List[pathlib.Path]]] = None, **metadata) Output document. :param paths: ESL input files. :param language: Output language. :param prologue: Markdown document to include as a prologue. :param epilogue: Markdown document to include as a conclusion. :param goal_section: Goal section toggle. :param transformation_section: Transformation section toggle. :param behavior_section: Behavior section toggle. :param design_section: Design section toggle. :param need_section: Need section toggle. :param relation_section: Need section toggle. :param var_table: Var table toggle. :param rich: Format to create rich output content in, defaults to 'tex'. :param rich_opts: Rich output generation options. :keyword Document metadata. See pandoc documentation.: .. py:property:: as_markdown :type: str Markdown representation of this document. .. py:attribute:: markdown_file_format :value: 'markdown+table_captions+multiline_tables+pipe_tables' .. py:attribute:: markdown_generated :value: 'markdown+table_captions+multiline_tables+pipe_tables+grid_tables' .. py:method:: parse_esl() Parse an ESL output Graph .. py:method:: yield_markdown() -> Generator[str, None, None] Yield markdown lines. .. py:method:: yield_metadata() -> Generator[str, None, None] Yield metadata lines. .. py:method:: yield_pars() -> Generator[str, None, None] Yield all paragraph texts. .. py:method:: save(path: Union[pathlib.Path, str], to: Optional[str] = None, pandoc_args: List[str] = ['--standalone', '--number-sections', '--toc', '--listings', '--self-contained'], filters: List[str] = ['pandoc-fignos']) Save document as a file. :param path: Path to save to. :param to: Optional format to save to. Normally derived from path. :param pandoc_args: Additional arguments for pandoc conversion tool. :param filters: Pandoc filters to use. .. py:method:: get_bundle_name_parts() -> Set[str] Get set of all name parts of bundles used within the spec :returns: Set of all name parts of bundles. .. py:method:: set_var_bundle_roots() Set the bundle root of variables if they originate from a bundle. .. py:class:: Par(lines: Iterable[str], obj: Optional[Any] = None) Paragraph. :param lines: Lines of this paragraph. :param obj: Object of this paragraph. .. attribute:: md Markdown representation. .. py:function:: get_bundle_root(vname: str, bundle_name_parts: Set) -> Union[None, str] Check if variable originates from a bundle and return the name of the root of the bundle. :param vname: Name of the variable to check. :param bundle_name_parts: Set of strings the comprise bundle names. :returns: None or Name of the root of the bundle from which the variable originates.