asciidoxy/generator/asciidoc.py
def process_adoc(in_file: Path,
                 build_dir: Path,
                 api_reference: ApiReference,
                 warnings_are_errors: bool = False,
                 multipage: bool = False,
                 progress: Optional[tqdm] = None):
    """Process an AsciiDoc file and insert API reference.

    Args:
        in_file:             AsciiDoc file to process.
        build_dir:           Directory to store build artifacts in.
        api_reference:       API reference to insert in the documents.
        warnings_are_errors: True to treat every warning as an error.
        multipage:          True to enable multi page output.

    Returns:
        Dictionary that maps input AsciiDoc files to output AsciiDoc files with inserted API
            reference.
    """

    context = Context(base_dir=in_file.parent,
                      build_dir=build_dir,
                      fragment_dir=build_dir / "fragments",
                      reference=api_reference,
                      current_document=DocumentTreeNode(in_file, None))

    context.build_dir.mkdir(parents=True, exist_ok=True)
    context.fragment_dir.mkdir(parents=True, exist_ok=True)

    context.warnings_are_errors = warnings_are_errors
    context.multipage = multipage
    context.progress = progress

    _process_adoc(in_file, context)
    context.linked = []
    context.preprocessing_run = False
    context.in_to_out_file_map[in_file] = _process_adoc(in_file, context)
    _check_links(context)
    return context.in_to_out_file_map
Process an AsciiDoc file and insert API reference.

    Args:
        in_file:             AsciiDoc file to process.
        build_dir:           Directory to store build artifacts in.
        api_reference:       API reference to insert in the documents.
        warnings_are_errors: True to treat every warning as an error.
        multipage:          True to enable multi page output.

    Returns:
        Dictionary that maps input AsciiDoc files to output AsciiDoc files with inserted API
            reference.
    
Process an AsciiDoc file and insert API reference.
Process an AsciiDoc file and insert API reference .
def process_adoc(in_file: Path,
                 build_dir: Path,
                 api_reference: ApiReference,
                 warnings_are_errors: bool = False,
                 multipage: bool = False,
                 progress: Optional[tqdm] = None):
    context = Context(base_dir=in_file.parent,
                      build_dir=build_dir,
                      fragment_dir=build_dir / "fragments",
                      reference=api_reference,
                      current_document=DocumentTreeNode(in_file, None))
    context.build_dir.mkdir(parents=True, exist_ok=True)
    context.fragment_dir.mkdir(parents=True, exist_ok=True)
    context.warnings_are_errors = warnings_are_errors
    context.multipage = multipage
    context.progress = progress
    _process_adoc(in_file, context)
    context.linked = []
    context.preprocessing_run = False
    context.in_to_out_file_map[in_file] = _process_adoc(in_file, context)
    _check_links(context)
    return context.in_to_out_file_map
def process_adoc ( in_file : Path , build_dir : Path , api_reference : ApiReference , warnings_are_errors : bool = False , multipage : bool = False , progress : Optional [ tqdm ] = None ) : context = Context ( base_dir = in_file . parent , build_dir = build_dir , fragment_dir = build_dir / "fragments" , reference = api_reference , current_document = DocumentTreeNode ( in_file , None ) ) context . build_dir . mkdir ( parents = True , exist_ok = True ) context . fragment_dir . mkdir ( parents = True , exist_ok = True ) context . warnings_are_errors = warnings_are_errors context . multipage = multipage context . progress = progress _process_adoc ( in_file , context ) context . linked = [ ] context . preprocessing_run = False context . in_to_out_file_map [ in_file ] = _process_adoc ( in_file , context ) _check_links ( context ) return context . in_to_out_file_map
Process an AsciiDoc file and insert API reference.
Process an AsciiDoc file and insert API reference .
"""Process an AsciiDoc file and insert API reference.

    Args:
        in_file:             AsciiDoc file to process.
        build_dir:           Directory to store build artifacts in.
        api_reference:       API reference to insert in the documents.
        warnings_are_errors: True to treat every warning as an error.
        multipage:          True to enable multi page output.

    Returns:
        Dictionary that maps input AsciiDoc files to output AsciiDoc files with inserted API
            reference.
    """
Dictionary that maps input AsciiDoc files to output AsciiDoc files with inserted API
reference.
Dictionary that maps input AsciiDoc files to output AsciiDoc files with inserted API reference .
in_file
Path
AsciiDoc file to process.
AsciiDoc file to process .
build_dir
Path
Directory to store build artifacts in.
Directory to store build artifacts in .
api_reference
ApiReference
API reference to insert in the documents.
API reference to insert in the documents .
warnings_are_errors
bool
True to treat every warning as an error.
True to treat every warning as an error .
multipage
bool
True to enable multi page output.
True to enable multi page output .
progress
Optional[tqdm]