Repository navigation
feat(memo): write Title, Author and Subject into a talk deck.pdf - #473
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's this PR do?
A downloaded talk deck had no Title or Author: joining the slide pages drops all document info, and the live pilot
deck.pdfshows onlyProducer: GPL Ghostscript._meta/scripts/talk-build.mjs: newstampMeta()writes/Title(post title),/Authorand/Subject(post description) intodeck.pdfwith a Ghostscript pdfmark, in both build paths. Author is thenamein_meta/talk-template/speakers/<handle>.jsonfor the firstauthorshandle when that file exists, else the handle. Text goes in as UTF-16BE hex, so accents, "Đ", quotes and parentheses survive. Withoutgsthe build warns and skips; nothing is installed.talk-build.mjsalso writestalk.speakerinto the post frontmatter from the speaker file'snamefor the first author, the way it writestalk.ratio. A value set by hand is never overwritten; no speaker file leaves the field absent. The foundation-apps Download button reads it. Documented besidetalk.ratioinhandbook/memo/contribute-to-memo.md._meta/scripts/talk-build-meta.test.mjs: seven cases. Four read the built deck back withpdfinfo(Title, Subject, speaker-file Author, handle fallback, Vietnamese title, rebuild keeps the fields); three covertalk.speaker(written from the speaker file, hand-set kept, absent without a speaker file). It skips when a required binary is missing.handbook/memo/assets/publish-a-talk/deck.pdfand the pilot frontmatter (talk.speaker: "Han Ngo"): the pilot rebuilt fromdeck-src. Media-sync re-uploads it on merge._meta/docs/verification/talk-pdf-metadata.md: the proof, under_meta/so the export ignores it.The Ghostscript compression is not in
talk-build.mjs: it iscompress-media.sh, run by media-sync after merge. It keeps document info (shown in the proof), so the stamp survives the upload.Companion: dwarvesf/foundation-apps#434 names the downloaded file
<post-slug>-<speaker-slug>.pdf.Test plan
Negative control: with
stampMeta()commented out the metadata cases fail 4 of 4, and withwriteSpeaker()commented out the speaker case fails; both green after restore. After merge, runpdfinfoon the R2 copy of the pilot deck once the strip commit lands.Any background context you want to provide? (if appropriate)
The pilot's slides are no longer in git, so the deck was rebuilt from
deck-srcin headless Helium. Onlydeck.pdfis committed; the rebuilt slides andog.pngare unchanged inputs.