sphinx-autopackage-script
This script parses a directory tree looking for python modules and packages and creates ReST files appropriately to create code documentation with Sphinx. It also creates a modules index (named modules.<suffix>).
Build the text of the file and write the file.
Create the module’s index.
Build the text of the file and write the file.
Create the automodule directive and add the options.
Create a heading of <level> [1, 2 or 3 supported].
Check if the directory is in the exclude list.
Parse and check the command line arguments.
Join package and module with a dot.
Normalize the excluded directory list: * must be either an absolute path or start with rootpath, * otherwise it is joined with rootpath * with trailing slash
Look for every file in the directory tree and create the corresponding ReST files.
Check if we want to skip this module.
Write the output file for module/package <name>.