Automatically create combined PDFs for Medley manuals which have mutliple files
Medley documentation has been written using TEdit with separate files for each chapter, with the workflow involving concatenating the PDFs of the title page, table of content and individual chapters into a single PDF.
We need
- a PDF concatenationn tool with a command line interface to do this. OR a HTML concatnation tool.
- A script that runs on each directory of the repos involved in HCFILES to
-
- first convert the TEdit files to PDF.
-
- then look for .book files in each directory. A .book file lists the components in the order it should appear in the concatenation
-
- convert a .book file to a .book.pdf file by concatinging.
Do all of this before creating the index.html files (so the 'books' will appear). The reason for making the books in a separate pass is that you want to make sure you've converted the individual chapters first. In some cases the same chapters have different prefaces.
We'll need some similar handling of making the DInfo database.
We could make the combined PDF files manually for the ones where we need them immediately because they're pointed to by buttons or links... after all, that's how they got there in the first place.
a PDF concatenationn tool with a command line interface to do this. OR a HTML concatnation tool.
Which OS does it need to run on? Does it need to be the same on multiple OSs?
There's one on (most? all?) macs at
'/System/Library/Automator/Combine PDF Pages.action/Contents/MacOS/join' --output output.pdf input1.pdf ... inputN.pdf
(/usr/local/bin/pdfjoin.py does NOT correctly link to this executable)
I haven't checked to see how well it works since I'm usually just using Preview not a command-line tool for that.
For Linux or FreeBSD, pdfunite from the poppler-utils package is likely the tool we need.
In doHCFILES.yml, presumably you could augment the current installation of vnc and ghostscript (for ps2pdf) with poppler-utils -- to make it:
- name: Install vnc & ghostscript (ps2pdf) & poppler-utils (pdfunite)
run: |
sudo apt-get update
sudo apt-get install -y tightvncserver
sudo apt-get install -y ghostscript
sudo apt-get install -y poppler-utils
To accommodate manuals available only as a series of scanned PDF chapters with no TEdit files, such as the TEdit and Sketch manuals, it would be useful for this process to also support contatenation only.
To accommodate manuals available only as a series of scanned PDF chapters with no TEdit files,
Those can be done once and the concatenation checked in.
The original purpose of HCFILES was to test out TEdit. We've gotten distracted from that, since we're not looking at the FAIL cases.