'Automatically Generate GitHub Wiki Documentation from Python Docstrings
The title says it all. What I imagine is to have docstrings for all of my modules, classes and functions and somehow nicely navigate the doc via github (wiki?). Also, the doc should be in sync with latest code meaning it should be updated/re-generated on push. Is that possible?
Solution 1:[1]
Just pipe the output of the generated docstring to a .md file.
Like this:
pydoc example_lib > example_lib.md .
Solution 2:[2]
Pydoc doesn't generate markdown, it generates an ad-hoc text markup that only occasionally by luck matches markdown. You would need to have an ad-hoc text to markdown converter, which will fail a lot, same as using the raw ad-hoc text as if it already were markdown.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Saurav Maheshkar |
| Solution 2 | MatthewMartin |
