We are using Sphinx to generate our Python documentation.
This is the command line we use:
sphinx-apidoc -F -o %WORKSPACE%\docs_rst %PACKAGE%
sphinx-build -b html %WORKSPACE%\docs_rst %WORKSPACE%\docs
The problem is that we get one page per package. What we would really need though is one page per module as the page gets way too long otherwise.
How would I set this up please?
New in version 0.5. This extension can generate links to the documentation of objects in external projects, either explicitly through the external role, or as a fallback resolution for any other cross-reference.
Sphinx AutoAPI provides "autodoc" style documentation for multiple programming languages without needing to load, run, or import the project being documented. In contrast to the traditional Sphinx autodoc, which is Python-only and uses code imports, AutoAPI finds and generates documentation by parsing source code.
I have submitted a patch to Sphinx to do exactly what you are asking for -- it adds a commandline option to apidoc that will put each module on its own page.
Patch can be viewed here: https://bitbucket.org/birkenfeld/sphinx/pull-request/161/added-option-to-apidoc-to-write-each
It's currently pending a merge into Sphinx, the command will add a separate tag that will work thusly:
sphinx-apidoc -o [output_dir] [package_dir] --separate
You might be able to do something like this using the autosummary
extension and the sphinx-autogen
script (possibly using custom templates).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With