Files
dec-doc-proc/README.adoc
2025-01-26 03:02:54 +01:00

26 lines
1.1 KiB
Plaintext

= DEC documentation processor
== Intro
This converts DEC-derived .txt files from whatever tool they used to generate documents to PDF including
a table of contents (which is handy with 400-odd page documents)
The code is terrible, and a non-trivial amount of the heavy lifting (including
all the page layout) is done in PostScript, but it works for the Mass
Storage Control Protocol documents from bitsavers, so I'm happy.
== Usage
....
python3 docproc.py -o mscp.ps mscp.txt
ps2pdf mscp.ps mscp.pdf
....
In order to change the font (which you probably will need to do), edit `prelude.ps` and look for the line that has `findfont` on it.
If you want the line numbers included, change `/zDN false def` to `/zDN true def` in `prelude.ps`. Depending on the font you're using, you may or may not also need to change the font size (`/zCH`)
== Disclaimer
This was a weekend hack, so don't expect much readability.
If it breaks, good luck with that. If you fix it, send a patch.
It also doesn't do quite as much as you might want: inline section references are ignored, tables aren't linked (though that)