pyusb icon indicating copy to clipboard operation
pyusb copied to clipboard

Please generate HTML docs!

Open fake-name opened this issue 8 years ago • 4 comments

Please, please, PLEASE generate HTML docs for PyUSB.

The useability of pydoc is complete crap compared to a web page - With a web page, I can easily have multiple tabs open to different sections of the documentation, there is an actual navigation interface, etc... While PyDoc works, it's minimal at best, and straight out of the 80's at worst.

PyDoc can natively generate somewhat ugly, but quite functional documentation, and github can do the hosting.


For my own use, and because I don't want to use pydoc from the CLI, I wrote a little batch file:

python -m pydoc -w usb
python -m pydoc -w usb.backend
python -m pydoc -w usb.core
python -m pydoc -w usb.control
python -m pydoc -w usb.util
python -m pydoc -w usb.legacy
python -m pydoc -w usb._debug
python -m pydoc -w usb._interop
python -m pydoc -w usb._lookup
python -m pydoc -w usb._objfinalizer

This generates a few (10) HTML files, with functional internal links for types and such.

fake-name avatar May 09 '17 00:05 fake-name

This seems to work fine. But there will be quite some dead links in the end.

(py39venv) C:\work\libusb\pyusb [master ≡ +2 ~4 -0 !]> .\pydoc.bat

C:\work\libusb\pyusb>python -m pydoc -w usb
wrote usb.html

C:\work\libusb\pyusb>python -m pydoc -w usb.backend
wrote usb.backend.html

C:\work\libusb\pyusb>python -m pydoc -w usb.core
wrote usb.core.html

C:\work\libusb\pyusb>python -m pydoc -w usb.control
wrote usb.control.html

C:\work\libusb\pyusb>python -m pydoc -w usb.util
wrote usb.util.html

C:\work\libusb\pyusb>python -m pydoc -w usb.legacy
wrote usb.legacy.html

C:\work\libusb\pyusb>python -m pydoc -w usb._debug
wrote usb._debug.html

C:\work\libusb\pyusb>python -m pydoc -w usb._interop
wrote usb._interop.html

C:\work\libusb\pyusb>python -m pydoc -w usb._lookup
wrote usb._lookup.html

C:\work\libusb\pyusb>python -m pydoc -w usb._objfinalizer
wrote usb._objfinalizer.html

mcuee avatar Aug 24 '21 05:08 mcuee

I mean, yeah, but my point was stick that on github pages or something.

fake-name avatar Aug 24 '21 21:08 fake-name

I mean, yeah, but my point was stick that on github pages or something.

But there are many broken links in the generated HTML files. So it does not seem to be a simple task.

mcuee avatar Aug 25 '21 07:08 mcuee

Sphinx could probably parse it and get better (looking and producing) documentation , you should take a look(still can be hosted on github pages)

arist0v avatar Mar 25 '23 17:03 arist0v