pyusb / pyusb

Easy USB access for Python
BSD 3-Clause "New" or "Revised" License
2.14k stars 670 forks source link

Please generate HTML docs! #181

Open fake-name opened 7 years ago

fake-name commented 7 years ago

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.

mcuee commented 3 years ago

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
fake-name commented 3 years ago

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

mcuee commented 3 years ago

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.

arist0v commented 1 year ago

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