Skip to content

Documentation only covers the usage within the CLI. Missing the usage instruction from within the code. #15

@ma-habibi

Description

@ma-habibi

The documentation of the docconvert only describes the usage within the CLI.
When using this module from within a Python file, we can use the sys module to use it as a CLI argument, just as instructed in the documentation.
However, hacking into the undocumented territory, we can instantiate a configuration type and use the module as any pip module.

import docconvert
config = docconvert.configuration.DocconvertConfiguration()
config.update_from_json(filepath="conf.json")
docconvert.core.convert_file(
    filepath="dog.py",
    config=config,
    in_place=True,
)

This works, and I think it should be documented.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions