From 304ea12e5a75a803790c796ec0ffa1ff881daeca Mon Sep 17 00:00:00 2001 From: Sacha Chua Date: Sun, 29 Nov 2026 20:42:12 -0500 Subject: more transcript --- emacsconf-publish.el | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 53 insertions(+), 2 deletions(-) diff --git a/emacsconf-publish.el b/emacsconf-publish.el index 1c8bace..9df1f9d 100644 --- a/emacsconf-publish.el +++ b/emacsconf-publish.el @@ -533,7 +533,9 @@ :transcript-details (if (and (plist-get talk :backstage) (emacsconf-talk-file talk "--main.vtt")) - (format "
Transcript%sTranscript%s +You can watch this talk now, ahead of the conference. It will also play on the stream at the scheduled time, but this way, you can start checking out the ideas and then come to the Q&A time with more questions. %s Enjoy!" + (if (string= (plist-get talk :qa-type) "none") + "You can ask your questions in the Etherpad or via IRC and we'll send them to the speaker, or you can also e-mail the speaker." + (format "Q&A will be right after the talk's time on the schedule. This talk's Q&A will start at around %s. It will be on the stream until the next talk starts, but people can continue asking questions and discussing ideas even after the stream moves on to the next talk. " + + (format-time-string "%FT%T%z" (plist-get talk :qa-time) t) + (format-time-string "%Y-%m-%d %-I:%M %p UTC%z" (plist-get talk :qa-time))))) + "") + (emacsconf-wiki-talk-resources talk)) + + "") "\n# Description\n")) (insert ""))) +(defun emacsconf-publish-format-transcript-cue-as-html (sub last-speaker video-id) + "Format SUB as HTML for VIDEO-ID. +If LAST-SPEAKER is specified, add a new paragraph if the speaker changes." + (let* ((msecs (elt sub 1)) + (text (replace-regexp-in-string + "^#" "\\\\#" + (replace-regexp-in-string + "*" "\\\\*" + (replace-regexp-in-string "\"" """ (elt sub 3))))) + (start (concat (format-seconds "%02h:%02m:%02s" (/ (floor msecs) 1000)) + "." (format "%03d" (mod (floor msecs) 1000)))) + last-speaker) + (if (or (and (elt sub 4) + (not (string= (elt sub 4) ""))) + (and (subed-speaker sub) + (not (string= last-speaker (subed-speaker sub))))) + (format "

%s

[%s] %s" + (if (and (elt sub 4) + (not (string= (subed-record-remove-directives (elt sub 4)) ""))) + (format "

%s

" (subed-record-remove-directives (elt sub 4))) + "") + video-id + start + video-id + start + start + start + video-id + text) + (format "%s" + start + start + video-id + text)))) (defun emacsconf-format-transcript-from-list (subtitles video-id &optional lang format) "Return subtitle directives for SUBTITLES." -- cgit v1.2.3