Do we have offline Python documentation browser in Ubuntu repositories to have one "point of service" to read and search the Python docs and APIs?
The question is in the title. As a use case one can imagine the situation about finding function basing on its known functionality.
I already know about Zeal which is packaged. It downloads documentation sets from Dash project. This is great but the Python versions differ from installed on system. They are usually newer.
The DevHelp application do not know about Python libraries. The search on pydoc3 -p 8080 does not work as expected. KHelpCenter does not know about Python. The doc-central package seems to be broken for long time. dochelp shows only index from /usr/share/doc-help and does not provide full-text search.
What else should I try to have ability for reading and searching Python documentation offline from /usr/share/doc (and similar locations)?
My system reports that I have 467 folders there (ls -1d /usr/share/doc/*python* | wc -l).
2 Answers
If you're talking about the documentation for Python itself (installable from the python3-doc package which depends on the actual system Python version's doc package), then you can just run a web server from /usr/share/doc/python3/html (e.g., using python3 -m http.server). The Python docs use Sphinx, which supports client-side searching.
Example using 18.04:
5I have created Bash shell script for searching locally installed Python documentation on Debian-based systems (such as Ubuntu) and placed it at GitHub.
This script allows one to run first preliminary full-text search to get Python package name and way to read the relevant documentation in the HTML-format.
It uses
aptitudefor Python package selection,html2textand/orpandocpackages to run the conversion from HTML to plain-text to get better search results.The script shows found local HTML documents in default web-browser and provides information about further methods of documentation reading - via DevHelp, DocHelp or web-browser.
More in general
"Zoraya ter Beek, age 29, just died by assisted suicide in the Netherlands. She was physically healthy, but psychologically depressed. It's an abomination that an entire society would actively facilitate, even encourage, someone ending their own life because they had no hope. Th…"