The Sample Programs Docs Generator
Previously known as the Sample Programs Wiki Generator, the Sample Programs Docs
Generator repo houses the generator.py script which we use in the Sample Programs
repository to generate our documentation. The script is automated by a GitHub Actions
build in the Sample Programs repo.
If you would like to propose a change, feel free to leverage the issues tab or make a pull request.
How It Works
The generator.py script works by analyzing the information in the Sample Programs
repository and storing that information in objects. These objects are then used to
generate various documentation pages in Markdown.
What is Automated
Currently, the script does two things:
- It maintains our entire Sample Programs wiki
- It maintains all of our READMEs in the Sample Programs repo
In terms of wiki automation, it generates 27 pages: 1 alphabet catalog and 26 alphabet pages.
The alphabet catalog contains a table with links to each alphabet page as well as metadata like the number of scripts and languages per letter. In addition, the alphabet catalog contains the total number of scripts and languages for the entire repo.
Each alphabet page contains a table which lists each language for that particular letter as well as metadata like the number of scripts per language as well as linking to articles and issues.
How to Run
At this time, the wiki generator is hardcoded for the Sample Programs repo. In order to
run it, you can install it as a package using pip:
pip install generate_docs
After that, you'll need a copy of the Sample Programs repo:
git clone https://github.com/TheRenegadeCoder/sample-programs.git
Finally, you can build the wiki using the following command:
wikig /path/to/sample-programs/repo/archive
Likewise, you can build the READMEs using the following command:
wikir /path/to/sample-programs/repo/archive
Alternatively, you can clone this repo to run the generate_wiki.py script directly:
python generator.py /path/to/sample-programs/repo/archive
Both solutions are designed to handle repo exploration from the /archive/ directory.
If successful, you should begin to see print statements for the various links under test
for The Renegade Coder. When finished, you'll have a /wiki/ directory next to your script
which contains the wiki. Likewise, all the READMEs should be updated.
At this point, you can push the wiki directly to the Sample Programs wiki.
Recently, as of 2.3.0, this script has been expanded to support projects outside of the Sample Programs repo. For example, this code now supports the automated generation of the How to Python repo as follows:
wikih
That's it!
Metadata
Release files for generate-docs 2.6.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| generate_docs-2.6.1.tar.gz | 20.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| generate_docs-2.6.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 42.1 kB
Release files / generate_docs-2.6.1.tar.gz
| Download URL | generate_docs-2.6.1.tar.gz |
|---|---|
| Size | 20.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7806c00b72b550c42cf0ed36aed6d629e29136d295ccc5f5cf25642005bb086f
|
|
BLAKE2b-256 checksum How to use checksums |
72222a455ebc07b40e8ea4122a73db29bac6db0836831080d50346e5294fb3a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6
|
Release files / generate_docs-2.6.1-py3-none-any.whl
| Download URL | generate_docs-2.6.1-py3-none-any.whl |
|---|---|
| Size | 21.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3b56db162aba67352998b0cdb36a5610dfd3f135ba886818c38cc506e4ef5bb9
|
|
BLAKE2b-256 checksum How to use checksums |
180bdc614253f1d5657ec1e2a0c61d99b0522cc555845d4cb52e0fed66a9c6d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6
|
Security for generate-docs 2.6.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.