summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2026-11-29 16:56:45 -0500
committerSacha Chua <sacha@sachachua.com>2026-11-29 16:56:45 -0500
commitc47ac67e5acdf73ac835dc73a727edbf6c3d6569 (patch)
treeadc2851875cb3ed461929e968127e0ed8c97e3e7
parent0041009df9ea71866cc886599b347c459de9975d (diff)
downloademacsconf-el-c47ac67e5acdf73ac835dc73a727edbf6c3d6569.tar.xz
emacsconf-el-c47ac67e5acdf73ac835dc73a727edbf6c3d6569.zip
Create check-in PDFs
* emacsconf-stream.el (emacsconf-stream-generate-all-checkin-pdfs): New command to create check-in PDFs. * emacsconf-stream.el (emacsconf-stream-generate-checkin-pdf): New command.
-rw-r--r--emacsconf-stream.el50
1 files changed, 50 insertions, 0 deletions
diff --git a/emacsconf-stream.el b/emacsconf-stream.el
index 1ea4db0..cb3f9e1 100644
--- a/emacsconf-stream.el
+++ b/emacsconf-stream.el
@@ -567,6 +567,56 @@ With a prefix argument (\\[universal-argument]), clear the overlay."
dir)
(expand-file-name (concat (plist-get talk :slug) ".pdf")
dir)))))
+
+(defun emacsconf-stream-generate-checkin-pdf (talk &optional prev info force)
+ "Use LaTeX to generate the check-in PDF for TALK based on assets/checkin/_template.tex."
+ (interactive (list (let ((emacsconf-publishing-phase 'conference))
+ (emacsconf-complete-talk-info))))
+ (let* ((dir (expand-file-name "checkin" emacsconf-stream-asset-dir))
+ (emacsconf-publishing-phase 'conference)
+ (template
+ (with-temp-buffer
+ (insert-file-contents
+ (expand-file-name "_template.tex" dir))
+ (buffer-string)))
+ (default-directory dir)
+ (live-time (emacsconf-timezone-strings-combined
+ (plist-get talk :live-time)
+ (plist-get talk :timezone))))
+ (write-region
+ (seq-reduce
+ (lambda (prev val)
+ (replace-regexp-in-string
+ (regexp-quote (concat "\\" (car val)))
+ (format "%s" (cdr val))
+ prev nil t))
+ `(("confName" . ,emacsconf-name)
+ ("confYear" . ,emacsconf-year)
+ ("talkSlug" . ,(plist-get talk :slug))
+ ("talkSpeakers" . ,(or (plist-get talk :speakers) ""))
+ ("talkTiming" . ,(if (plist-get talk :video-file)
+ "You have a recorded video, so we'll play it at the time scheduled for your talk. We'll give you a few minutes heads-up here before your live Q\\&A starts."
+ "You're doing the talk live, so we'll give you a few minutes heads-up before you're on air."))
+ ("talkTitle" . ,(or (plist-get talk :title) ""))
+ ("talkURL" . ,(plist-get talk :absolute-url))
+ ("padURL" . ,(plist-get talk :pad-url))
+ ("liveTime" . ,live-time)
+ ("ircChannel" . ,(plist-get talk :channel)))
+ template)
+ nil
+ (expand-file-name (concat (plist-get talk :slug) ".tex") dir))
+ (shell-command
+ (format "lualatex -shell-escape %s"
+ (expand-file-name (concat (plist-get talk :slug) ".tex")
+ dir)))))
+
+
+(defun emacsconf-stream-generate-all-checkin-pdfs (&optional info)
+ "Generate all checkins."
+ (interactive)
+ (mapc #'emacsconf-stream-generate-checkin-pdf
+ (or info emacsconf-schedule-draft (emacsconf-publish-prepare-for-display (emacsconf-filter-talks (or info (emacsconf-get-talk-info)))))
+ ))
;; (emacsconf-stream-generate-in-between-page (emacsconf-resolve-talk "science") nil nil t)
;; (emacsconf-stream-generate-in-between-page (emacsconf-resolve-talk "health") nil nil t)
;; (emacsconf-stream-generate-in-between-page (emacsconf-resolve-talk "eev") nil nil t)