2025-01-26 03:02:54 +01:00
2025-01-26 03:02:54 +01:00
2025-01-26 03:02:54 +01:00
2025-01-26 03:02:54 +01:00
2025-01-26 03:02:54 +01:00
2025-01-26 03:02:54 +01:00

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 Im 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 youre using, you may or may not also need to change the font size (/zCH)

Disclaimer

This was a weekend hack, so dont expect much readability. If it breaks, good luck with that. If you fix it, send a patch.

It also doesnt do quite as much as you might want: inline section references are ignored, tables arent linked (though that)

Description
No description provided
Readme 588 KiB
Languages
Python 82.8%
PostScript 17.2%