Intended to provide quick static documentations for packages hosted on GitHub.
This package parses the docstrings of any installed Python module
into a simple Markdown format, grouped by
submodules, classes and functions.
The resulting hierarchy is following the namespace based on the
package's __all__ attributes, thus correctly documenting possibly shortened
import paths.
Assuming the following package structure
module
├── submodule
│ ├── __init__.py
│ └── bar.py
├── __init__.py
└── foo.py
with the classes module.foo.Foo and module.submodule.bar.Bar.
In case your module is configured to import all possible components on the top level
(i.e. module.Foo and module.Bar),
doc2md will automatically pick this up and document the classes in the correct
namespace:
# **module** Module Overview
## Submodules
* `module.submodule`
## Classes
* `Foo`
* `Bar`
git clonepip install -e .
The tests will select 10 installed packages at random and run them through doc2md.
cd tests && ./run_tests.sh
Use doc2md MODULENAME from the command line (doc2md --help for help).
By default, everything is printed to stdout.
Use the -o argument to create and print into a directory.
The -d argument controls submodule depth.
Change it to a higher number for more detailed submodule docs.
The --mode argument allows to switch between a detailed and compact documentation mode.