Maybe not, pydoc-markdown (https://github.com/NiklasRosenstein/pydoc-markdown) looks like it just yanks out the right parts, and doesn't do any filtering or manipulating. Score!

#python #markdown #pydoc-markdown

GitHub - NiklasRosenstein/pydoc-markdown: Create Python API documentation in Markdown format.

Create Python API documentation in Markdown format. - NiklasRosenstein/pydoc-markdown

GitHub

OK, #python question: How do I generate docs for an embedded python project that uses a #SWIG generated library? #pydoc #pdoc and the like rightly complain about non-existent modules, but all the information I want is contained in docstrings and type annotations, so it *should* be possible to generate docs right?

Is there a tool for this?

Discovered, or possibly rediscovered, that for documenting Python modules « python -m pydoc -w png » will produce HTML documentation of the png module. And pydoc is in the Python Standard Library. AFAICT the only styling is automatically produced hyperlinks. I had a quick look at the code (to see if there were any undocumented styling features), and my impression was "plenty of attack surface here". (for example, pydoc includes a web server).

#Python #pydoc

@serge @helge

I don't quite understand that difference. #PyDoc uses either docstrings or the comments above a function/module/class/etc. as the comment I'd expect Sphinx to do the same:
https://docs.python.org/3/library/pydoc.html (see paragraph two).

pydoc — Documentation generator and online help system

Source code: Lib/pydoc.py The pydoc module automatically generates documentation from Python modules. The documentation can be presented as pages of text on the console, served to a web browser, or...

Python documentation

@serge many of the projects we use in Python, like #Flask, are documented using #Sphinx, which can be configured to automatically generate API documentation from Python source code:

https://www.sphinx-doc.org/en/master/tutorial/automatic-doc-generation.html

This is (similar to the #yardoc and #rdoc situation) backwards compatible with #pydoc, though much more expressive due to the machine-readable format for defining parameters, return values and potential exceptions:

https://www.sphinx-doc.org/en/master/tutorial/automatic-doc-generation.html

https://docs.python.org/3/library/pydoc.html

Automatic documentation generation from code — Sphinx documentation

#python stdlib has a generated code documenter shoved into it: #pydoc. It has a lot of design problems, top of which is that it works poorly as a pure CI task to generate static HTML.

I forked it and made it at least usable, albeit still ugly.

https://github.com/matthewdeanmartin/pydoc_fork

Next step would be to use modern website templating. Maybe if it ever got attention & I felt peer pressure to improve it again.

GitHub - matthewdeanmartin/pydoc_fork: A fork of pydoc to fix some problems with it.

A fork of pydoc to fix some problems with it. Contribute to matthewdeanmartin/pydoc_fork development by creating an account on GitHub.

GitHub
I have just found the #pydoc command hidden somewhere in my path... why oh why are not people always talking about this??
ot spoiler, I promisling so the discourseâinfo/url/410206 TOWARDS WAR]⭐️ 🔇 🍸 🍍Basg, falselygayoodnight, and may the force be with you morningmoving toward his lipsso softlyfor usI.e for that #pydoc HTML5 formatter is visible. \o/cksli.deAnyone tried this? FASCdation (jean validation)ークなあ(issueはあるシリーズin Martian packet?
#pydoc's HTMLDoc formatter apparently doesn't close a few tags (i.e. generates invalid HTML) and that really confused me…
Finally the finish line for that #pydoc HTML5 formatter is visible. \o/