medley
medley copied to clipboard
Getting all available Medley documentation converted to PDF
I've been working on this for a while but maybe it's not obvious.
There is now a utility in medley/internal/MEDLEY-UTILS called HCFILES:
(FILESLOAD MEDLEY-UTILS) (HCFILES)
will scan MEDLEYDIR and all subdirectories for TEDIT TED SKETCH TXT files and convert to postscript ... which then I run through the Acrobat distiller to create PDFs, and then use Acrobat to combine into a single file.
After reverting back to an older version of TEDIT (from envos) and making a small patch to SKETCH
(viz https://github.com/Interlisp/medley/pull/836#pullrequestreview-1040942506 ) I've managed to convert 99% of the TEdit documents to a single 4.5 MB 2058 page PDF. https://drive.google.com/drive/u/0/folders/10ZBQty5gEwdBnZHtEbXfe5f1dHGziGZG
So far the problems remain
- [x] 3-4 crashes in GC with bad free list. Fortunately, (HCFILES) with no arguments defaults to "don't convert if the .PS file is already there". The files get stored in tmp/psfiles/
path
where path is the original file name with>
turned into-
; so (SAVEVM) before starting, run (HCFILES) and on the crash, delete the last .PS file and restart. - [x] Several image object files will be loaded again if not loaded already. I load TMAX, IMTOOLS and a couple of others in my init; haven't tested whether the autoloading of IMAGEOBJ functions work for those.
- [x] This doesn't work with current TEdit (see notes on PR #836 and following)
- [x] the changes to HCFILES and SKETCH aren't checked in.
- [ ] Documentation written in Japanese doesn't convert to PDF (shows up as black boxes)
- [ ] Odd formatting glitches...
- [x] This is just one step of documenting maiko and medley sufficiently to address many of the "documentation" wishes and issues.
Update:
- HCFILES moving to "test" repo. Currently in test/new/printing/ (should move to test/library/tedit probably)
- Most problems fixed; but see BADFILES.TXT for files in Envos repo that had problems.
- still a few crashes
- must preload image object support files if not in DIRECTORIES (Notefile)
- Things checked into test repo
- still problems with characters outside of c0 and formatting glitched (likely font problems)
- Should add .NOTEFILE .NOTE to list of extensions
- Results are in Interlisp shared Google drive:
- medley, test, notecards, loops documents
- https://drive.google.com/drive/u/0/folders/10ZBQty5gEwdBnZHtEbXfe5f1dHGziGZG
- from Envos repo (request access if you need)
- https://drive.google.com/drive/u/0/folders/1o4l-zB5Mfl-M0W8N1U4EMHGYeo55orpY
- medley, test, notecards, loops documents
wrt Japanese, you might try loading the JAPANESE file. This defines the various Japanese external formats, which presumaby wouldn’t matter for these XCC-encoded Tedit files. But who knows?
It may also just be a font problem, the Japanese characters probably exist at best only in Classic or Modern.
On Jul 16, 2022, at 11:38 AM, Larry Masinter @.***> wrote:
I've been working on this for a while but maybe it's not obvious. There is now a utility in medley/internal/MEDLEY-UTILS called HCFILES: (FILESLOAD MEDLEY-UTILS) (HCFILES) will scan MEDLEYDIR and all subdirectories for TEDIT TED SKETCH TXT files and convert to postscript ... which then I run through the Acrobat distiller to create PDFs, and then use Acrobat to combine into a single file. After reverting back to an older version of TEDIT (from envos) and making a small patch to SKETCH (viz #836 (review) https://github.com/Interlisp/medley/pull/836#pullrequestreview-1040942506 ) I've managed to convert 99% of the TEdit documents to a single 4.5 MB 2058 page PDF. https://drive.google.com/drive/u/0/folders/10ZBQty5gEwdBnZHtEbXfe5f1dHGziGZG https://drive.google.com/drive/u/0/folders/10ZBQty5gEwdBnZHtEbXfe5f1dHGziGZG So far the problems remain [] 3-4 crashes in GC with bad free list. Fortunately, (HCFILES) with no arguments defaults to "don't convert if the .PS file is already there". [] Several image object files will be loaded again if not loaded already. I load TMAX, IMTOOLS and a couple of others in my init; haven't tested whether the autoloading of IMAGEOBJ functions work for those. [] This doesn't work with current TEdit (see notes on PR #836 https://github.com/Interlisp/medley/pull/836 and following) [] the changes to HCFILES and SKETCH aren't checked in. [] Documentation written in Japanese doesn't convert to PDF (shows up as black boxes) [] Odd formatting glitches... [] This is just one step of documenting maiko and medley sufficiently to address many of the "documentation" wishes and issues.
— Reply to this email directly, view it on GitHub https://github.com/Interlisp/medley/issues/838, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQSTUJKPHPRMY462ZK7NYADVUL6QTANCNFSM53YPAWZA. You are receiving this because you are subscribed to this thread.
HCFILES now back in medley repo in file internal/MEDLEY-UTILS
The output is now in the pub-pdfs repo. Which means they are available under https://interlisp.org/pub-pdfs/ including https://interlisp.org/pub-pdfs/all-medley.pdf which is 4341 pages and includes all tedit and sketch files from the medley, notecards, loops, test repos as well.
This is still a manual process that needs to be automated.
made good progress on this... HCFILES uses TEDIT.FORMATTEDFILEP, most of the other problems are noted elsewhere.
The notes on Japanese keyboards need some investigation.