Next / Previous / Contents / Shipman's homepage

6. docbook5index: The script

Here we present the docbook5index script in lightweight literate programming form.

6.1. Prologue

The script starts with a “pound-bang line” to make it self-executing under Unix systems, and a comment that points the interested reader back at this documentation.

docbook5index
#!/usr/bin/env python
#================================================================
# docbook5index: Generate an ID index of DocBook section elements
#   For documentation, see:
#     http://www.nmt.edu/~shipman/soft/docbook5index/
#----------------------------------------------------------------
# Command line arguments:
#   docbook5index FILE.xml
# Writes "toc.fo", an XSL-FO file; use xep or fop to make toc.pdf.
#----------------------------------------------------------------