summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2026-11-29 20:42:12 -0500
committerSacha Chua <sacha@sachachua.com>2026-11-29 20:42:12 -0500
commit304ea12e5a75a803790c796ec0ffa1ff881daeca (patch)
tree021eb20c2ad7902bcd52892aa105fb0fe711511e
parent48ebfde0f7c1ec31c3cf4857a36a9411579321de (diff)
downloademacsconf-el-304ea12e5a75a803790c796ec0ffa1ff881daeca.tar.xz
emacsconf-el-304ea12e5a75a803790c796ec0ffa1ff881daeca.zip
more transcript
-rw-r--r--emacsconf-publish.el55
1 files 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 "<details><summary>Transcript</summary>%s</details" (emacsconf-publish-format-transcript talk nil nil nil 'html))
+ (format "<details><a name=\"transcript-%s\"></a><summary>Transcript</summary>%s</details"
+ (plist-get talk :slug)
+ (emacsconf-publish-format-transcript talk nil nil nil 'html))
"")
:youtube-info (if (plist-get talk :youtube-url)
(format
@@ -858,10 +860,59 @@ This includes the intro note, the schedule, and talk resources."
(insert (emacsconf-publish-format-talk-schedule-image talk info))))
(insert (emacsconf-publish-format-talk-schedule-info talk) "\n\n")
(insert
- (if (plist-get talk :public) (emacsconf-wiki-talk-resources talk) "")
+ (if (plist-get talk :public)
+ (concat
+ (if (eq emacsconf-publishing-phase 'schedule)
+
+ (format "<div class=\"preview\" style=\"padding: 10px; border: 1px solid black; color: lightgreen\">
+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!</div>"
+ (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&amp;A will be right after the talk's time on the schedule. This talk's Q&A will start at around <strong><span class=\")time-overlay\" start=\"%s\">%s</span></strong>. 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 "<!-- End of emacsconf-publish-before-page -->")))
+(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 "\"" "&quot;" (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 "</p>%s<p><a href=\"#%s\" class=\"subtitle\" data-start=\"%s\" data-video=\"%s\">[%s]</a> <span class=\"subtitle\" data-start=\"%s\" title=\"%s\" data-video=\"%s\">%s</span>"
+ (if (and (elt sub 4)
+ (not (string= (subed-record-remove-directives (elt sub 4)) "")))
+ (format "<h3>%s</h3>" (subed-record-remove-directives (elt sub 4)))
+ "")
+ video-id
+ start
+ video-id
+ start
+ start
+ start
+ video-id
+ text)
+ (format "<span class=\"subtitle\" data-start=\"%s\" title=\"%s\" data-video=\"%s\">%s</span>"
+ start
+ start
+ video-id
+ text))))
(defun emacsconf-format-transcript-from-list (subtitles video-id &optional lang format)
"Return subtitle directives for SUBTITLES."