From bdf3e3e13a39271d4f55d46eb0dd68f08a7e83b4 Mon Sep 17 00:00:00 2001 From: Sacha Chua Date: Sat, 3 Dec 2022 01:38:31 -0500 Subject: watch pages --- emacsconf-publish.el | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/emacsconf-publish.el b/emacsconf-publish.el index 87a623f..3aed8a0 100644 --- a/emacsconf-publish.el +++ b/emacsconf-publish.el @@ -123,13 +123,13 @@ (emacsconf-publish-public-index-on-wiki) (when emacsconf-public-media-directory (emacsconf-publish-public-index (expand-file-name "index.html" emacsconf-public-media-directory)) - (emacsconf-generate-playlist (expand-file-name "index.m3u" emacsconf-public-media-directory) + (emacsconf-publish-playlist (expand-file-name "index.m3u" emacsconf-public-media-directory) (concat emacsconf-name emacsconf-year) (emacsconf-public-talks emacsconf-info) (format "https://media.emacsconf.org/%s/" emacsconf-year))) (when emacsconf-backstage-dir (emacsconf-publish-backstage-index (expand-file-name "index.html" emacsconf-backstage-dir))) - (emacsconf-generate-playlist (expand-file-name "index.m3u" emacsconf-backstage-dir) + (emacsconf-publish-playlist (expand-file-name "index.m3u" emacsconf-backstage-dir) (concat emacsconf-name emacsconf-year) (emacsconf-filter-talks emacsconf-info) (format "https://media.emacsconf.org/%s/backstage/" emacsconf-year))) @@ -1154,7 +1154,12 @@ Entries are sorted chronologically, with different tracks interleaved." (defun emacsconf-publish-public-index (&optional filename) (interactive (list (expand-file-name "index.html" emacsconf-public-media-directory))) (setq filename (or filename (expand-file-name "index.html" emacsconf-public-media-directory))) - (let ((files (directory-files emacsconf-public-media-directory))) + (let ((files (directory-files emacsconf-public-media-directory)) + (info (emacsconf-public-talks (emacsconf-prepare-for-display (emacsconf-get-talk-info))))) + (emacsconf-publish-playlist (expand-file-name "index.m3u" emacsconf-public-media-directory) + (concat emacsconf-name emacsconf-year) + info + (format "https://media.emacsconf.org/%s/" emacsconf-year)) (with-temp-file filename (insert "" @@ -1194,7 +1199,7 @@ Entries are sorted chronologically, with different tracks interleaved." o) (list "--answers.webm" "--answers.vtt" "--answers--chapters.vtt"))) ""))) - (emacsconf-public-talks (emacsconf-get-talk-info)) + info "\n") "" (if (file-exists-p (expand-file-name "include-in-public-index.html" emacsconf-cache-dir)) @@ -1470,7 +1475,7 @@ Entries are sorted chronologically, with different tracks interleaved." (browse-url-of-file "pad-template.html")) -(defun emacsconf-generate-playlist (filename playlist-name talks &optional base-url) +(defun emacsconf-publish-playlist (filename playlist-name talks &optional base-url) (with-temp-file filename (insert (format "#EXTM3U\n#PLAYLIST: %s\n#EXTALB: %s\n#EXTGENRE: Speech\n%s" playlist-name playlist-name @@ -1533,7 +1538,7 @@ Entries are sorted chronologically, with different tracks interleaved." ;;; Video services (autoload 'subed-parse-file "subed-common") -(defun emacsconf-publish-video-description (talk &optional copy) +(defun emacsconf-publish-video-description (talk &optional copy skip-title) (interactive (list (emacsconf-complete-talk-info) t)) (let ((chapters (subed-parse-file (expand-file-name @@ -1556,15 +1561,17 @@ Entries are sorted chronologically, with different tracks interleaved." (mod (elt chapter 1) 1000) (elt chapter 3))) chapters "\n") - "\n") + "\n\n") "")) talk) - "${conf-name} ${year}: ${title} -${speakers-with-pronouns} -${absolute-url} + (concat + (if skip-title "" "${conf-name} ${year}: ${title} - ${speakers-with-pronouns} +") + "${absolute-url} + +${chapters}You can view this and other resources using free/libre software at ${absolute-url} . During the conference, you can ask questions via the Etherpad or through IRC (${webchat-url} , or ${channel} on irc.libera.chat). Afterwards, check the talk page at ${absolute-url} for notes and contact information. -${chapters}You can view this and other resources using free/libre software at ${absolute-url}. -This video is available under the terms of the Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.")) +This video is available under the terms of the Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license."))) (if copy (kill-new result)) result)) ;; (emacsconf-publish-video-description (emacsconf-find-talk-info "async") t) @@ -1703,7 +1710,7 @@ This video is available under the terms of the Creative Commons Attribution-Shar (mapconcat (lambda (track) (emacsconf-replace-plist-in-string (append (list :year emacsconf-year) track) - "
${name}
${channel}${stream}${id}-480p.webm")) + "
${name}
${channel}${stream}${id}-480p.webm")) emacsconf-tracks "\n") "\n\n" @@ -1800,7 +1807,7 @@ ${title-info}
" (emacsconf-publish-page-nav nav "watch") - " | ${stream-nav}
+ " | ${stream-nav} | Tips for watching/participating
Alternatively, load ${stream-hires} or ${480p} (low-res) in a streaming media player such as MPV.
-- cgit v1.2.3