Skip to main content

generate troff manpages and htm manual pages from C source comments via docbook reference and markdown parts

Project description

zzipmakedocs

background

The ZZipLib had been embedding documentation into the C source code from the beginning. For some time a tool cpp2markdown was extracting the parts, based on the pygments lexer. From there the markdown parts were compiled into a docbook <references> xml master. And with the xmlto docbook processor the dozens of troff man.3 pages and html parts were written.

However the xmlto docbook processor turned out to be quite unstable, with the results being not very readable. So a tool dbk2man was created to generate the troff pages. The cpp2markdown turned out to be not very configurable, so it was replaced by a zzipdoc transformer that got the function references better and it does not anymore depend on the pygments lexer.

The zziplib/docs are now compiling the source *.c input with a tool zzipmakedocs that generates the intermediate docook.xml format. And dbk2man turns that into dozens of files in subdirectories man3 or html which get packaged as tarball for installation.

As it can be helpful for others, the documentation generator is packaged as pypi tool as well. The sources for that are still in the zziplib project.

running

  • zzipmakedocs *.py ../zzip/*.c --package MyLibrary --release 0.1 --output mydocbook
    • there is also a --onlymainheader mylib.h option that only scans c-files having that include
  • dbk2man.py man mydocbook.xml -o man3
    • generates troff format files into subdirectory man3 (arguments similar to xmlto)
  • dbk2man.py html mydocbook.xml -o html
    • generates html format files into subdirectory html (arguments similar to xmlto)

Using the --onlymainheader the zziplib build rules generate the documentation for three libraries instead of just one. That's because there is a main library and two derivates that are smaller but sharing the same internal helper functions.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zzipmakedocs-0.13.79-py3-none-any.whl (82.0 kB view details)

Uploaded Python 3

File details

Details for the file zzipmakedocs-0.13.79-py3-none-any.whl.

File metadata

  • Download URL: zzipmakedocs-0.13.79-py3-none-any.whl
  • Upload date:
  • Size: 82.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.11

File hashes

Hashes for zzipmakedocs-0.13.79-py3-none-any.whl
Algorithm Hash digest
SHA256 6e930b9cf8a384ae7daeae01c62941b2c7db4877de61046f46b998300635b7cc
MD5 177b68ac73812f012eba325027486794
BLAKE2b-256 5e0fc5916d81749b583bc56dd8195f70ad15b20d992b6a03da68b85a03614083

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page