From 7ff8f33b89acd67a8f30ad068f8575b77022dd8e Mon Sep 17 00:00:00 2001 From: Sacha Chua Date: Wed, 21 Dec 2022 09:47:29 -0500 Subject: publishing talk files, use the wiki as the main copy if it exists --- emacsconf-publish.el | 31 +++++++++++++++++++++++-------- emacsconf.el | 22 +++++++++++++--------- 2 files changed, 36 insertions(+), 17 deletions(-) diff --git a/emacsconf-publish.el b/emacsconf-publish.el index 412696d..f43542d 100644 --- a/emacsconf-publish.el +++ b/emacsconf-publish.el @@ -51,6 +51,7 @@ (defun emacsconf-publish-update-talk (talk) "Publish the schedule page and the page for this talk." (interactive (list (emacsconf-complete-talk-info))) + (when (stringp talk) (setq talk (emacsconf-resolve-talk talk))) (when (functionp 'emacsconf-upcoming-insert-or-update) (emacsconf-upcoming-insert-or-update)) (emacsconf-publish-with-wiki-change @@ -288,9 +289,7 @@ (let* ((video-base (and (stringp video-file) (replace-regexp-in-string "reencoded\\|original" "main" (file-name-base video-file)))) (chapter-info (and (stringp video-file) (emacsconf-make-chapter-strings - (expand-file-name - (concat video-base "--chapters.vtt") - emacsconf-cache-dir) + (plist-get talk :chapter-file) (plist-get talk :track-base-url) video-id))) (info @@ -443,7 +442,8 @@ resources." :base-url (concat emacsconf-media-base-url (plist-get o :conf-year) "/") :track-base-url - (format "/%s/captions/" (plist-get o :conf-year))) + (format "/%s/captions/" (plist-get o :conf-year)) + :chapter-file (emacsconf-talk-file o "--main--chapters.vtt")) o)) (concat (if (plist-get o :qa-public) "# Talk\n\n" "") @@ -460,7 +460,9 @@ resources." :toobnix-url nil :captions-edited (plist-get o :qa-captions-edited) :video-file (emacsconf-talk-file o "--answers.webm") - :audio-file (emacsconf-talk-file o "--answers.opus")) + :audio-file (emacsconf-talk-file o "--answers.opus") + :chapter-file (emacsconf-talk-file o "--answers--chapters.vtt")) + o) (list "--answers.webm" "--answers.vtt" "--answers--chapters.vtt" "--answers.opus"))) ""))) @@ -1378,9 +1380,8 @@ answers without needing to listen to everything again. You can see