Make Sphinx generate me rst for class documentation from pydoc

Posted by Michal Cihar on Stack Overflow See other posts from Stack Overflow or by Michal Cihar
Published on 2010-04-19T14:28:46Z Indexed on 2010/04/21 14:53 UTC
Read the original article Hit count: 286

Filed under:
|
|

I'm currently in process of migrating existing (non complete) documentation to Sphinx. The final goal is to have all documentation in Sphinx.

The problem I'm facing right now is that I have some documentation using Python docstrings (well the module is actually written in C, but it probably does not matter) and I would like to generate class documentation in form usable for Sphinx from these docstrings.

I know there is sphinx.ext.autodoc, but it automatically puts current docstrings to the document. I rather want to generate source (rst) file based on current docstrings, which I could edit and improve manually.

So is there some way to turn existing docstrings into rst form which Sphinx consumes?

© Stack Overflow or respective owner

Related posts about python

Related posts about sphinx