diff options
Diffstat (limited to '')
| -rw-r--r-- | emacsconf-publish.el | 145 | ||||
| -rw-r--r-- | emacsconf-schedule.el | 28 | ||||
| -rw-r--r-- | emacsconf.el | 15 | 
3 files changed, 103 insertions, 85 deletions
diff --git a/emacsconf-publish.el b/emacsconf-publish.el index b2c82b3..968a3f2 100644 --- a/emacsconf-publish.el +++ b/emacsconf-publish.el @@ -449,7 +449,10 @@ resources."                    o))    (concat     (if (plist-get o :qa-public) "# Talk\n\n" "") -   (emacsconf-index-card o emacsconf-main-extensions) +   (emacsconf-index-card o +                         (if (plist-get o :captions-edited) +                             emacsconf-main-extensions +                           (remove "--main.vtt" emacsconf-main-extensions)))     (if (plist-get o :qa-public)         (concat "\n\n# Q&A\n\n"                 (emacsconf-index-card (append @@ -479,8 +482,9 @@ resources."      (emacsconf-replace-plist-in-string       (append o               (list :format -                   (concat (or (plist-get o :video-duration) -                               (concat (plist-get o :duration) "-min talk")) +                   (concat (or (plist-get o :video-time) +                               (plist-get o :duration)) +                           "-min talk"                             (if (plist-get o :q-and-a)                                 (format " followed by %s Q&A (%s)  "                                         (plist-get o :q-and-a) @@ -506,13 +510,13 @@ resources."                         (let ((start (org-timestamp-to-time (org-timestamp-split-range timestamp)))                               (end (org-timestamp-to-time (org-timestamp-split-range timestamp t))))                           (format -                          "<div>Times in different timezones:</div><div class=\"times\" start=\"%s\" end=\"%s\"><div class=\"conf-time\">%s</div><div class=\"others\">%s</div></div><div><a href=\"/%s/watch/%s/\">Find out how to watch and participate</a></div>" +                          "<div>Times in different timezones:</div><div class=\"times\" start=\"%s\" end=\"%s\"><div class=\"conf-time\">%s</div><div class=\"others\"><div>which is the same as:</div>%s</div></div><div><a href=\"/%s/watch/%s/\">Find out how to watch and participate</a></div>"                            (format-time-string "%Y-%m-%dT%H:%M:%SZ" start t)                            (format-time-string "%Y-%m-%dT%H:%M:%SZ" end t)                            (emacsconf-timezone-string o emacsconf-timezone)                            (string-join (emacsconf-timezone-strings                                          o -                                        (seq-filter (lambda (zone) (string= emacsconf-timezone zone)) +                                        (seq-remove (lambda (zone) (string= emacsconf-timezone zone))                                                      emacsconf-timezones)) "<br />")                            emacsconf-year                            (plist-get (emacsconf-get-track (plist-get o :track)) :id))) @@ -564,7 +568,7 @@ ${pad-info}${irc-info}${status-info}${schedule-info}\n"        (when is-live (emacsconf-publish-captions-in-wiki talk))        (when (eq emacsconf-publishing-phase 'schedule)          (insert "\nThe following image shows where the talk is in the schedule for " -                (format-time-string "%a %Y-%m-%d" (plist-get talk :start-time) emacsconf-timezone) ". Solid lines show talks with Q&A via BigBlueButton. Lashed lines show talks with Q&A via IRC or Etherpad." +                (format-time-string "%a %Y-%m-%d" (plist-get talk :start-time) emacsconf-timezone) ". Solid lines show talks with Q&A via BigBlueButton. Dashed lines show talks with Q&A via IRC or Etherpad."                  (format "<div class=\"schedule-in-context schedule-svg-container\" data-slug=\"%s\">\n" (plist-get talk :slug))                             (let* ((width 800) (height 150)                         (talk-date (format-time-string "%Y-%m-%d" (plist-get talk :start-time) emacsconf-timezone)) @@ -932,8 +936,7 @@ Entries are sorted chronologically, with different tracks interleaved."                           :title (plist-get o :title)                           :url (concat "/" (plist-get o :url))                           :speakers (plist-get o :speakers) -                         :q-and-a (plist-get o :q-and-a) -                         :qa-link (plist-get o :qa-link) +                         :q-and-a (plist-get o :qa-link)                           :watch (plist-get o :watch-url)                           :note                           (string-join @@ -1739,7 +1742,7 @@ This video is available under the terms of the Creative Commons Attribution-Shar                   :start-info (emacsconf-surround "<span class=\"sched-start\">" (plist-get talk :start) "</span>" "")                   :end-info(emacsconf-surround " - <span class=\"sched-end\">" (plist-get talk :end) "</span>" "")                   :track-info (emacsconf-surround (format " <span class=\"sched-track %s\">" (or (plist-get talk :track) "")) (plist-get talk :track) "</span>" "") -                 :q-info  (emacsconf-surround " <span class=\"sched-q-and-a\">Q&A: " (plist-get talk :q-and-a) "</span>; " "") +                 :q-info  (emacsconf-surround " <span class=\"sched-q-and-a\">Q&A: " (plist-get talk :qa-link) "</span>; " "")                   :pad-info (emacsconf-surround " <span class=\"sched-pad\"> <a href=\""                                                   (plist-get talk :pad-url) "\">Etherpad</a></span>; " "")                   :slug-info (emacsconf-surround " <span class=\"sched-slug\">id:" (plist-get talk :slug) "</span>" "") @@ -1840,35 +1843,34 @@ ${title-info}  (defun emacsconf-publish-watch-pages ()    "Update /year/watch pages."    (interactive) -  (mapc (lambda (track) -          (plist-put track :year emacsconf-year) -          (plist-put track :stream (concat emacsconf-stream-base (plist-get track :id) ".webm")) -          (plist-put track :stream-hires (concat emacsconf-stream-base (plist-get track :id) ".webm")) -          (plist-put track :480p (concat emacsconf-stream-base (plist-get track :id) "-480p.webm")) -          (plist-put track :webchat-channels (concat "emacsconf,emacsconf-" (plist-get track :id))) -          (plist-put track :webchat (concat emacsconf-chat-base "?join=" (plist-get track :webchat-channels))) -          (plist-put track :channel (concat "#emacsconf-" (plist-get track :id)))) -        emacsconf-tracks) -  (let* ((info (emacsconf-prepare-for-display (emacsconf-get-talk-info))) -         (emacsconf-publishing-phase 'schedule) -         (emacsconf-use-absolute-url t)) -    (when emacsconf-directory -      (emacsconf-publish-with-wiki-change -        (make-directory (expand-file-name "watch" (expand-file-name emacsconf-year emacsconf-directory)) t) -        (with-temp-file (expand-file-name "watch/info.md" (expand-file-name emacsconf-year emacsconf-directory)) -          (insert "[[!sidebar content=\"\"]]" (emacsconf-publish-format-watch-index info))) -        (mapc (lambda (track) -                (with-temp-file (expand-file-name (format "%s/watch/%s.md" emacsconf-year (plist-get track :id)) -                                                  emacsconf-directory) -                  (insert (emacsconf-publish-format-watch-track (append track (list :title "")) info)))) -              emacsconf-tracks))) -    ;; Update live.emacsconf.org -    (when emacsconf-publish-watch-directory -      (make-directory (expand-file-name "watch" (expand-file-name emacsconf-year emacsconf-publish-watch-directory)) t) -      (with-temp-file (expand-file-name "watch/index.html" (expand-file-name emacsconf-year emacsconf-publish-watch-directory)) -        (insert "<html><head><title>Watch EmacsConf</title><link rel=\"stylesheet\" type=\"text/css\" href=\"/style.css\"></link></head><body>" (emacsconf-publish-format-watch-index info) - -" <p> +  (let ((tracks +         (mapcar (lambda (track) +                   (append (list :year emacsconf-year           +                                 :stream (concat emacsconf-stream-base (plist-get track :id) ".webm")           +                                 :stream-hires (concat emacsconf-stream-base (plist-get track :id) ".webm")           +                                 :480p (concat emacsconf-stream-base (plist-get track :id) "-480p.webm")) +                           track)) +                 emacsconf-tracks))) +    (let* ((info (emacsconf-prepare-for-display (emacsconf-get-talk-info))) +           (emacsconf-publishing-phase 'schedule) +           (emacsconf-use-absolute-url t)) +      (when emacsconf-directory +        (emacsconf-publish-with-wiki-change +          (make-directory (expand-file-name "watch" (expand-file-name emacsconf-year emacsconf-directory)) t) +          (with-temp-file (expand-file-name "watch/info.md" (expand-file-name emacsconf-year emacsconf-directory)) +            (insert "[[!sidebar content=\"\"]]" (emacsconf-publish-format-watch-index info))) +          (mapc (lambda (track) +                  (with-temp-file (expand-file-name (format "%s/watch/%s.md" emacsconf-year (plist-get track :id)) +                                                    emacsconf-directory) +                    (insert (emacsconf-publish-format-watch-track (append track (list :title "")) info)))) +                tracks))) +      ;; Update live.emacsconf.org +      (when emacsconf-publish-watch-directory +        (make-directory (expand-file-name "watch" (expand-file-name emacsconf-year emacsconf-publish-watch-directory)) t) +        (with-temp-file (expand-file-name "watch/index.html" (expand-file-name emacsconf-year emacsconf-publish-watch-directory)) +          (insert "<html><head><title>Watch EmacsConf</title><link rel=\"stylesheet\" type=\"text/css\" href=\"/style.css\"></link></head><body>" (emacsconf-publish-format-watch-index info) + +                  " <p>          Depending on which media player you use, you may enter the stream address          in a graphical user interface or provide it as an argument to the program          when launching it from the terminal. @@ -1903,36 +1905,36 @@ when the host has opened the Q&A.</p>  " -                "</body></html>")) -      (mapc (lambda (track) -              (make-directory (expand-file-name (format "%s/watch/%s" emacsconf-year (plist-get track :id)) emacsconf-publish-watch-directory) t) -              (make-directory (expand-file-name (format "%s/watch/%s-480p" emacsconf-year (plist-get track :id)) emacsconf-publish-watch-directory) t) -              (with-temp-file (expand-file-name (format "%s/watch/%s/index.html" emacsconf-year (plist-get track :id)) -                                                emacsconf-publish-watch-directory) -                (insert -                 (emacsconf-replace-plist-in-string -                  track -                  "<html><head><title>Watch EmacsConf ${name} track</title><link rel=\"stylesheet\" type=\"text/css\" href=\"/style.css\"></link></head><body>") -                 (emacsconf-publish-format-watch-track (append track -                                                               (list :title -                                                                     (emacsconf-replace-plist-in-string -                                                                      track -                                                                      "EmacsConf ${year}: ${name} track"))) -                                                       info) -                 "</body></html>")) -              (with-temp-file (expand-file-name (format "%s/watch/%s-480p/index.html" emacsconf-year (plist-get track :id)) -                                                emacsconf-publish-watch-directory) -                (insert -                 (emacsconf-replace-plist-in-string -                  track -                  "<html><head><title>Watch EmacsConf ${name} track (low-res)</title><link rel=\"stylesheet\" type=\"text/css\" href=\"/style.css\"></link></head><body>") -                 (emacsconf-publish-format-watch-track -                  (append (list :stream (plist-get track :480p) -                                :title (emacsconf-replace-plist-in-string track "EmacsConf ${year}: ${name} track (low-res)")) -                          track) -                  info) -                 "</body></html>"))) -            emacsconf-tracks)))) +                  "</body></html>")) +        (mapc (lambda (track) +                (make-directory (expand-file-name (format "%s/watch/%s" emacsconf-year (plist-get track :id)) emacsconf-publish-watch-directory) t) +                (make-directory (expand-file-name (format "%s/watch/%s-480p" emacsconf-year (plist-get track :id)) emacsconf-publish-watch-directory) t) +                (with-temp-file (expand-file-name (format "%s/watch/%s/index.html" emacsconf-year (plist-get track :id)) +                                                  emacsconf-publish-watch-directory) +                  (insert +                   (emacsconf-replace-plist-in-string +                    track +                    "<html><head><title>Watch EmacsConf ${name} track</title><link rel=\"stylesheet\" type=\"text/css\" href=\"/style.css\"></link></head><body>") +                   (emacsconf-publish-format-watch-track (append track +                                                                 (list :title +                                                                       (emacsconf-replace-plist-in-string +                                                                        track +                                                                        "EmacsConf ${year}: ${name} track"))) +                                                         info) +                   "</body></html>")) +                (with-temp-file (expand-file-name (format "%s/watch/%s-480p/index.html" emacsconf-year (plist-get track :id)) +                                                  emacsconf-publish-watch-directory) +                  (insert +                   (emacsconf-replace-plist-in-string +                    track +                    "<html><head><title>Watch EmacsConf ${name} track (low-res)</title><link rel=\"stylesheet\" type=\"text/css\" href=\"/style.css\"></link></head><body>") +                   (emacsconf-publish-format-watch-track +                    (append (list :stream (plist-get track :480p) +                                  :title (emacsconf-replace-plist-in-string track "EmacsConf ${year}: ${name} track (low-res)")) +                            track) +                    info) +                   "</body></html>"))) +              tracks)))))  (defvar emacsconf-publish-current-dir "/ssh:orga@media.emacsconf.org:/var/www/media.emacsconf.org/2022/current" @@ -1996,9 +1998,10 @@ There is no live Q&A room for ${title}. You can find more information about the                                                  (regexp-quote (plist-get talk :video-slug))                                                  (regexp-opt emacsconf-main-extensions)))))              (mapc (lambda (file) -                     -                    (copy-file (expand-file-name file emacsconf-backstage-dir) -                               (expand-file-name file emacsconf-public-media-directory) t)) +                    (when (or (not (string-match "--main.vtt$" file)) +                              (plist-get talk :captions-edited)) +                      (copy-file (expand-file-name file emacsconf-backstage-dir) +                                 (expand-file-name file emacsconf-public-media-directory) t)))                    files))          ;; Remove files from public          (let ((files (directory-files emacsconf-public-media-directory nil diff --git a/emacsconf-schedule.el b/emacsconf-schedule.el index f4cdeda..7c9c060 100644 --- a/emacsconf-schedule.el +++ b/emacsconf-schedule.el @@ -642,16 +642,24 @@ Both start and end time are tested."    "Write the proposed schedule to FILENAME using the variables in VARLIST.  If emacsconf-schedule-apply is non-nil, update `emacsconf-org-file' and the wiki."    (declare (debug t)) -  `(let* (,@varlist) -     (let* ((schedule (emacsconf-schedule-prepare arranged)) -            (info (if emacsconf-schedule-expected-talks -                      (emacsconf-schedule-inflate-sexp emacsconf-schedule-expected-talks) -                    (emacsconf-get-talk-info))) -            (validation (or (emacsconf-schedule-validate schedule info) ""))) -       (with-temp-file ,filename -         (svg-print (emacsconf-schedule-svg 800 200 schedule))) -       (clear-image-cache) -       (mapconcat (lambda (o) (format "- %s\n" o)) (append validation (list (format "[[file:%s]]" filename))))))) +  `(prog1 +     (let* (,@varlist) +       (let* ((schedule (emacsconf-schedule-prepare arranged)) +              (info (if emacsconf-schedule-expected-talks +                        (emacsconf-schedule-inflate-sexp emacsconf-schedule-expected-talks) +                      (emacsconf-get-talk-info))) +              (validation (or (emacsconf-schedule-validate schedule info) ""))) +         (when (and (boundp 'emacsconf-schedule-apply) emacsconf-schedule-apply) +           (emacsconf-schedule-update-from-info schedule)) +         (with-temp-file ,filename +           (svg-print (emacsconf-schedule-svg 800 200 schedule))) +         (clear-image-cache) +         (mapconcat (lambda (o) (format "- %s\n" o)) (append validation (list (format "[[file:%s]]" filename)))))) +     (when (and (boundp 'emacsconf-schedule-apply) emacsconf-schedule-apply) +       (emacsconf-publish-before-pages) +       (emacsconf-publish-schedule) +       ;; (emacsconf-update-schedule) +       )))  (defun emacsconf-schedule-format-summary-row (o)    (pcase emacsconf-focus diff --git a/emacsconf.el b/emacsconf.el index a3fc06c..b5a846d 100644 --- a/emacsconf.el +++ b/emacsconf.el @@ -589,9 +589,11 @@                                       (plist-get o :slug)))    (let ((track (emacsconf-get-track (plist-get o :track))))      (when track -      (plist-put o :watch-url (concat emacsconf-base-url emacsconf-year "/watch/" (plist-get track :id)))) +      (plist-put o :watch-url (concat emacsconf-base-url emacsconf-year "/watch/" (plist-get track :id))) +      (plist-put o :webchat-url (concat emacsconf-chat-base "?join=emacsconf," +                                      (replace-regexp-in-string "#" "" +                                                                (plist-get track :channel)))))      (plist-put o :channel (plist-get track :channel)) -    (plist-put o :webchat-url (concat emacsconf-chat-base "?join=emacsconf," (plist-get track :channel)))      (plist-put o :bbb-backstage (concat emacsconf-media-base-url emacsconf-year "/backstage/current/room/" (plist-get o :slug)))      (cond       ((string= (or (plist-get o :q-and-a) "") "") @@ -602,12 +604,17 @@        (plist-put o :qa-info (plist-get o :bbb-redirect))        (plist-put o :qa-link (format "<a href=\"%s\">BBB</a>" (plist-get o :bbb-redirect))))       ((string-match "IRC" (plist-get o :q-and-a)) -      (plist-put o :qa-info (concat (emacsconf-surround "nick: " (plist-get o :irc) ", " "") -                                    (plist-get o :channel))) +      (plist-put o :qa-info (concat "#" (plist-get o :channel)  +                                    (emacsconf-surround ", speaker nick: " (plist-get o :irc) "")))        (plist-put o :qa-link (format "<a href=\"%s\">%s</a>" (plist-get o :webchat-url) (plist-get o :qa-info))))       ((string-match "Mumble" (plist-get o :q-and-a))        (plist-put o :qa-info "Moderated via Mumble, ask questions via pad or IRC")        (plist-put o :qa-link (format "<a href=\"%s\">%s</a>" (plist-get o :webchat-url) (plist-get o :qa-info)))) +     ((string-match "pad" (plist-get o :q-and-a)) +      (plist-put o :qa-info "Etherpad") +      (plist-put o :qa-link (format "<a href=\"%s\">%s</a>" +                                    (plist-get o :pad-url) +                                    (plist-get o :qa-info))))       (t (plist-put o :qa-info "none")          (plist-put o :qa-link "none")))      (plist-put o :pad-url (format "https://pad.emacsconf.org/%s-%s" emacsconf-year (plist-get o :slug)))  | 
