How to use the portray.render.documentation function in portray

To help you get started, we’ve selected a few portray examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github timothycrosley / portray / portray / api.py View on Github external
modules: list = None,
) -> None:
    """Produces HTML documentation for a Python project placing it into output_dir.

       - *directory*: The root folder of your project.
       - *config_file*: The [TOML](https://github.com/toml-lang/toml#toml)
         formatted config file you wish to use.
       - *output_dir*: The directory to place the generated HTML into.
       - *overwrite*: If set to `True` any existing documentation output will be removed
         before generating new documentation. Otherwise, if documentation exists in the
         specified `output_dir` the command will fail with a `DocumentationAlreadyExists`
         exception.
       - *modules*: One or more modules to render reference documentation for
    """
    directory = directory if directory else os.getcwd()
    render.documentation(
        project_configuration(directory, config_file, modules=modules, output_dir=output_dir),
        overwrite=overwrite,
    )
    print(logo.ascii_art)
    print(f"Documentation successfully generated into `{os.path.abspath(output_dir)}` !")