Include directive 'inheritance-diagram' in all *.rst files for each modules

89 views
Skip to first unread message

sajuptpm

unread,
Dec 12, 2011, 7:12:08 AM12/12/11
to sphinx-dev
I am using "sphinx-apidoc" for documentation
$ sphinx-apidoc -f -F -o . /home/sam/CMS
$ make html

I want to include class 'inheritance-diagram' in all my module
document page.
Right now, i have to edit all *rst file and add two lines as shown
below, for each modules.

class inheritance diagram
-------------------------
.. inheritance-diagram:: CMS.cloud.DbModel.modulename


Have any otherway to do it in single shot, like what "sphinx-apidoc"
did for documentation ???
I could not find any option in document of "sphinx-apidoc" tool
http://sphinx.pocoo.org/invocation.html#invocation-of-sphinx-apidoc

Laurent Savaete

unread,
Dec 12, 2011, 6:20:51 PM12/12/11
to sphin...@googlegroups.com
why not get into the source code of sphinx-apidoc (apidoc.py which you'll have if you clone the repository) and add the rst text you want in there?
There's a function called create_module_file which you could amend to throw in the inheritance diagram directive you want, for instance.
Reply all
Reply to author
Forward
0 new messages