Pythonista markdown document generator from a single file, intended to be used to generate documentation for Github. Included in the generated documentation are:
- Module-level docstring.
- Classes and their functions, with docstrings.
- Module-level functions and their docstrings.
- Decorators are included, with the following special cases:
- Properties are placed in a separate section, using the docstring of the getter.
on_main_threaddecorators are ignored.
- A table of contents.
Functions and methods that start with '_' are not included in the documentation.
Include this script in the Pythonista action (wrench) menu, and run it to generate documentation for the file currently open in the editor.
You can choose to just view the resulting documentation as HTML, or also save it as either
Table of contents is included after the module docstring.
There are some special directives you can use to fine-tune the output. These are magic comment strings that must be preceeded only by white space.
#docgen-toc- Table of contents will replace this string if found in the module docstring, so that you can have the ToC in the middle of it instead of at the end.
#docgen:(with a space after the colon) - Use to group functions into related groups. The text you provide after the colon will be included in the table of contents.
Methods to generate markdown documentation from source classes, functions and their docstrings.
Produces the markdown for the file.
include_undocumented- set to
Trueto include classes and methods without a docstring.
for_functions(self, c, heading, toc_level)
Simplifies ugly strings into something URL-friendly.
slugify("[Some] _ Article's Title--") --> some-articles-title