From 152011371ee37e38bd67227c2d7c9fca704b9be1 Mon Sep 17 00:00:00 2001 From: Sacha Chua Date: Sun, 5 Nov 2023 08:47:43 -0500 Subject: add duration to backstage, get end time properly organize bbb redirect logically, too --- emacsconf-publish.el | 57 +++++++++++++++++++++++++++++----------------------- emacsconf.el | 9 +++++++++ 2 files changed, 41 insertions(+), 25 deletions(-) diff --git a/emacsconf-publish.el b/emacsconf-publish.el index 0e1ac7e..9b6e851 100644 --- a/emacsconf-publish.el +++ b/emacsconf-publish.el @@ -147,15 +147,16 @@ (append talk (list + :time-info (emacsconf-surround "Duration: " (plist-get talk :video-duration) " minutes" "") :video-html (or (plist-get video :video) "") :audio-html (or (plist-get video :audio) "") - :chapter-list (or (plist-get video :chapter-list) "") + :chapter-list (or (plist-get video :chapter-list) "") :resources (or (plist-get video :resources) "") :extra (or (plist-get talk :extra) "") :speaker-info (or (plist-get talk :speakers-with-pronouns) "")))) (emacsconf-replace-plist-in-string talk - "
${video-html}${audio-html}
${extra}
${resources}${chapter-list}
"))) + "
${video-html}${audio-html}
${extra}
${time-info}${resources}${chapter-list}
"))) ;; (emacsconf-publish-format-track-as-org (car emacsconf-tracks) "US/Eastern") ;; (emacsconf-get-talk-info) @@ -292,7 +293,10 @@ (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 - (plist-get talk :chapter-file) + (or (plist-get talk :chapter-file) + (expand-file-name + (concat (file-name-sans-extension video-base) "--chapters.vtt") + emacsconf-cache-dir)) (plist-get talk :track-base-url) video-id))) (info @@ -524,12 +528,21 @@ resources." (plist-get o :webchat-url)) :status-info (if (member emacsconf-publishing-phase '(cfp program schedule conference)) (format "Status: %s \n" (plist-get o :status-label)) "") + :alternate-apac-info + (if (plist-get o :alternate-apac) + (format "[[!inline pages=\"internal(%s/inline-alternate)\" raw=\"yes\"]] \n" emacsconf-year) + "") :schedule-info (if (and (member emacsconf-publishing-phase '(schedule conference)) (not (emacsconf-talk-all-done-p o)) (not (string= (plist-get o :status) "CANCELLED"))) - (let ((start (org-timestamp-to-time (org-timestamp-split-range timestamp))) - (end (org-timestamp-to-time (org-timestamp-split-range timestamp t)))) + (let* ((end + (org-timestamp-to-time + (org-timestamp-split-range + (org-timestamp-from-string (plist-get o :scheduled)) t))) + (start (org-timestamp-to-time + (org-timestamp-split-range + (org-timestamp-from-string (plist-get o :scheduled)))))) (format "
Times in different timezones:
%s
which is the same as:
%s
Find out how to watch and participate
" (format-time-string "%Y-%m-%dT%H:%M:%SZ" start t) @@ -542,14 +555,10 @@ resources." emacsconf-year (plist-get (emacsconf-get-track (plist-get o :track)) :id))) ""))) - (concat - "[[!toc ]] + "[[!toc ]] Format: ${format} -${pad-info}${irc-info}${status-info}${schedule-info}\n" - (if (plist-get o :alternate-apac) - (format "[[!inline pages=\"internal(%s/inline-alternate)\" raw=\"yes\"]] \n" emacsconf-year) - "") - "\n")))) +${pad-info}${irc-info}${status-info}${schedule-info}\n +${alternate-apac-info}\n"))) (defun emacsconf-publish-format-email-questions-and-comments (talk) "Invite people to e-mail either the public contact for TALK or the private list." @@ -1125,9 +1134,7 @@ Entries are sorted chronologically, with different tracks interleaved." (list :extra (if (plist-get f :caption-note) (concat "
" (plist-get f :caption-note) "
") "") :files - (cons - (plist-get f :video-file) - (emacsconf-publish-talk-files f files))))) + (emacsconf-publish-talk-files f files)))) (format "
  • %s
    %s (id:%s)
    %s
  • " (plist-get f :slug) (plist-get f :absolute-url) @@ -1140,7 +1147,7 @@ Entries are sorted chronologically, with different tracks interleaved." (defun emacsconf-publish-backstage-to-assign (by-status files) (let ((list (assoc-default "TO_ASSIGN" by-status))) - (format "

    %s talk(s) to be captioned (%d minutes)

    You can e-mail sacha@sachachua.com to call dibs on editing the captions for one of these talks. We use OpenAI Whisper to provide auto-generated VTT that you can use as a starting point, but you can also write the captions from scratch if you like. If you're writing them from scratch, you can choose to include timing information, or we can probably figure them out afterwards with a forced alignment tool. More info: captioning tips

    " + (format "

    %s talk(s) to be captioned, waiting for volunteers (%d minutes)

    You can e-mail sacha@sachachua.com to call dibs on editing the captions for one of these talks. We use OpenAI Whisper to provide auto-generated VTT that you can use as a starting point, but you can also write the captions from scratch if you like. If you're writing them from scratch, you can choose to include timing information, or we can probably figure them out afterwards with a forced alignment tool. More info: captioning tips

    " (length list) (emacsconf-sum :video-time list) (mapconcat @@ -1171,7 +1178,6 @@ Entries are sorted chronologically, with different tracks interleaved." (setq f (append f (list :extra - (concat "
    " (emacsconf-surround "Being captioned by " (plist-get f :captioner) " " "") (emacsconf-surround "Note: " (plist-get f :caption-note) "" "") @@ -1207,9 +1213,6 @@ Entries are sorted chronologically, with different tracks interleaved." emacsconf-main-extensions))) (assoc-default "TO_STREAM" by-status) "\n"))) -(defvar emacsconf-backstage-phase 'harvest) ; prerec - - (defun emacsconf-publish-backstage-index (&optional filename) (interactive) (setq filename (or filename (expand-file-name "index.html" emacsconf-backstage-dir))) @@ -1250,7 +1253,11 @@ Entries are sorted chronologically, with different tracks interleaved." "