A method of generating documentation on Linux using pydoctor and some bash magic for Python projects that are not object-oriented.
- Python 3 (Preferably 3.10)
- python3-pip
- pydoctor
- Task Runner Extension for VSCode
- Linux (Tested on Fedora 37)
- Download this project with
git clone https://github.com/PhysCorp/Pydoctor-Plus.git - Install the requirements with
python3 -m pip install -r requirements.txt. - Move all of the folders and files from
.vscodeandapito the root of your project. - (If you haven't already) Download and install the Task Runner Extension for VSCode.
- When ready to generate pydoctor documentation for your project, open the
Task Runnermenu on the left-hand side of the screen and click theCompile API Documentation from Project Foldertask. The documentation will be generated in thedocsfolder in your project directory, separated into each python file path. - Next, run the
Link Together ALL API Doc Filestask in Task Runner to link all of the files together into one file. The file will be located in thedocsfolder in your project directory, namedindex.html. - Profit!
Please check out the files in .vscode and api to see what you can change to fit your needs. For example, you can specify the name of the linked HTML document inside of link_documentation.sh in the api/scripts folder.