diff options
author | Sacha Chua <sacha@sachachua.com> | 2022-11-22 08:34:20 -0500 |
---|---|---|
committer | Sacha Chua <sacha@sachachua.com> | 2022-11-22 08:34:20 -0500 |
commit | 59333798b0cd7fd285f5e0b3550bb926eab3c38c (patch) | |
tree | 1e0a86f15e17ef38afd33bae15257a036b9b5796 | |
parent | 911ca4f70fbd06602c6e8d427638e1c9ee85716a (diff) | |
download | emacsconf-el-59333798b0cd7fd285f5e0b3550bb926eab3c38c.tar.xz emacsconf-el-59333798b0cd7fd285f5e0b3550bb926eab3c38c.zip |
generate status page for live.emacsconf.org
Diffstat (limited to '')
-rw-r--r-- | emacsconf-pad.el | 84 | ||||
-rw-r--r-- | emacsconf-publish.el | 32 | ||||
-rw-r--r-- | emacsconf-schedule.el | 2 | ||||
-rw-r--r-- | emacsconf-stream.el | 136 | ||||
-rw-r--r-- | emacsconf.el | 17 |
5 files changed, 240 insertions, 31 deletions
diff --git a/emacsconf-pad.el b/emacsconf-pad.el index 5af8ba3..c7fc10c 100644 --- a/emacsconf-pad.el +++ b/emacsconf-pad.el @@ -318,14 +318,30 @@ ${next-talk-list} ;; (emacsconf-pad-export-initial-content-for-hyperlists "/ssh:media:~/backstage/hyperlists") (defun emacsconf-pad-format-shift-hyperlist (shift info) - (concat - "<h1>" (plist-get shift :id) "</h1>" - (emacsconf-replace-plist-in-string - shift - "<p>Host: ${host}, Streamer: ${streamer}, IRC: ${irc}, Pad: ${pad}, Check-in: ${checkin}</p>") - (emacsconf-replace-plist-in-string - shift - " + (let* ((prefixed (list + :start (plist-get shift :start) + :end (plist-get shift :end) + :host (emacsconf-surround "HOST-" (plist-get shift :host) "" "HOST") + :stream (emacsconf-surround "STREAM-" (plist-get shift :streamer) "" "STREAM") + :irc-volunteer (emacsconf-surround "IRC-" (plist-get shift :irc) "" "IRC") + :checkin (emacsconf-surround "CHECKIN-" (plist-get shift :checkin) "" "CHECKIN") + :pad (emacsconf-surround "PAD-" (plist-get shift :pad) "" "PAD") + :coord (emacsconf-surround "COORD-" (plist-get shift :coord) "" "COORD"))) + (shift-talks + (mapcar (lambda (o) (append prefixed o)) + (seq-filter + (lambda (talk) (string= (plist-get talk :track) (plist-get shift :track))) + (emacsconf-filter-talks-by-time (plist-get shift :start) (plist-get shift :end) info))))) + (concat + (emacsconf-replace-plist-in-string + shift + (concat + "<h1>" (plist-get shift :id) "</h1>" + "<p>Host: ${host}, Streamer: ${streamer}, IRC: ${irc}, Pad: ${pad}, Check-in: ${checkin}, Coord: ${coord}</p>")) + (emacsconf-replace-plist-in-string + prefixed + (concat + " <strong>Setup</strong> <ul><li>[ ] ${checkin}: Open the index: https://media.emacsconf.org/${year}/backstage/index-${track-id}.html</li> <li>[ ] ${host}: Open the intro pad and the index: https://media.emacsconf.org/${year}/backstage/index-${track-id}.html</li> @@ -345,22 +361,42 @@ ${next-talk-list} <li>[ ] Watch the stream with MPV on your local system: mpv https://live0.emacsconf.org/emacsconf/$TRACK.webm &</li> <li>[ ] Check 480p: mpv https://live0.emacsconf.org/emacsconf/$TRACK-480p.webm &</li> <li>[ ] Test with a sample video or Q&A session: ssh emacsconf-$TRACK@res.emacsconf.org -p 46668 \"~/bin/track-mpv meetups &\"</li> -</ul></li></ul> -") - "<ul>" - (emacsconf-pad-shift-hyperlist - (list - :start (plist-get shift :start) - :end (plist-get shift :end) - :host (emacsconf-surround "HOST-" (plist-get shift :host) "" "HOST") - :stream (emacsconf-surround "STREAM-" (plist-get shift :streamer) "" "STREAM") - :irc-volunteer (emacsconf-surround "IRC-" (plist-get shift :irc) "" "IRC") - :checkin (emacsconf-surround "CHECKIN-" (plist-get shift :checkin) "" "CHECKIN") - :pad (emacsconf-surround "PAD-" (plist-get shift :pad) "" "PAD")) - (seq-filter - (lambda (talk) (string= (plist-get talk :track) (plist-get shift :track))) - (emacsconf-filter-talks-by-time (plist-get shift :start) (plist-get shift :end) info))) - "</ul>")) +</ul></li> +<li>[ ] ${coord}: ssh -t orga@live0.emacsconf.org 'screen -S restream-${track-id}-youtube /home/orga/restream-${track-id}-youtube.sh' and then confirm</li> +<li>[ ] ${coord}: ssh -t orga@live0.emacsconf.org 'screen -S restream-${track-id}-toobnix /home/orga/restream-${track-id}-toobnix.sh' and then confirm</li> +<li>[ ] ${coord}: update the status page on live.emacsconf.org</li> +</ul> +" + "<ul>" + (mapconcat #'cdr + (sort + (append + (delq nil + (mapcar (lambda (talk) + (when (plist-get talk :checkin-time) + (emacsconf-replace-plist-in-string + (append (list :checkin-time-info + (format-time-string "%-l:%M" (plist-get talk :checkin-time) emacsconf-timezone)) + talk) + "<li>${checkin}: Double-check that the speaker for ${title} has checked in; let #emacsconf-org know if not</li>"))) + shift-talks)) + (mapcar + ;; talks + (lambda (talk) + (cons (plist-get talk :start-time) + (emacsconf-pad-talk-hyperlist + (append prefixed talk)))) + shift-talks)) + (lambda (a b) (time-less-p (car a) (car b)))) + "\n") + "</ul>" + "Teardown +<ul> +<li>[ ] ${coord}: stop the restream-${track-id}-youtube screen on live0</li> +<li>[ ] ${coord}: stop the restream-${track-id}-toobnix screen on live0</li> +<li>[ ] ${coord}: update the status page on live.emacsconf.org</li> +</ul>")) + ))) (defun emacsconf-pad-prepopulate-hyperlists () (interactive) diff --git a/emacsconf-publish.el b/emacsconf-publish.el index 2d5964a..a998779 100644 --- a/emacsconf-publish.el +++ b/emacsconf-publish.el @@ -862,7 +862,8 @@ 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)) + :q-and-a (plist-get o :q-and-a) + :pad (plist-get o :pad-url)) (unless (eq emacsconf-publishing-phase 'program) (list :track (plist-get o :track) @@ -1611,11 +1612,13 @@ Entries are sorted chronologically, with different tracks interleaved." :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>; " "") + :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>" "") :speaker-info (emacsconf-surround " <div class=\"sched-speakers\">" (plist-get talk :speakers-with-pronouns) "</div>" "") :resources-info (emacsconf-surround "<ul class=\"resources\">" (plist-get talk :resources) "</ul>" ""))) "<div data-start=\"${startutc}\" data-end=\"${endutc}\" class=\"sched-entry track-${track}\"> -<div class=\"sched-meta\"><span class=\"sched-time\">${start-info}${end-info}</span>${track-info}${q-info}${slug-info}</div> +<div class=\"sched-meta\"><span class=\"sched-time\">${start-info}${end-info}</span>${track-info}${pad-info}${q-info}${slug-info}</div> <div class=\"sched-title\"><a href=\"${base-url}${url}\">${title}</a></div> ${speaker-info} ${resources-info} @@ -1745,7 +1748,30 @@ ${title-info} <pre>mpv https://live0.emacsconf.org:9001/emacsconf/gen.webm vlc https://live0.emacsconf.org:9001/emacsconf/gen.webm ffplay https://live0.emacsconf.org:9001/emacsconf/gen.webm -</pre>" +</pre> + +<p>If you experience any disruptions, try reloading the page you're using +to watch the video. If that still doesn't work, please check our +status page at <a href=\"https://status.emacsconf.org\">https://status.emacsconf.org</a> for updates on the +status of various parts of our infrastructure, and instructions on how +to get in touch with us about disruptions.</p> + +<p>If you prefer, you can watch the livestream via Toobnix: +<a href=\"https://toobnix.org/w/7t9X8eXuSby8YpyEKTb4aj\">General track</a>, +<a href=\"https://toobnix.org/w/w6K77y3bNMo8xsNuqQeCcD\">Development track</a>. +Pre-recorded videos and replays will also be available on Toobnix in +the <a href=\"https://toobnix.org/c/emacsconf\">EmacsConf channel</a>.</p> + +<p>To participate in the Q&A, please check the talk page for the Q&A +details, including the Etherpad link, IRC channel, and optionally +a BigBlueButton room (BBB) for Q&A. If you plan to participate in +Q&A in the BigBlueButton room, please use headphones or earphones +in order to minimize audio feedback. The link on the talk page +will take you to a waiting room that will automatically refresh +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) diff --git a/emacsconf-schedule.el b/emacsconf-schedule.el index 27070db..cfd20f3 100644 --- a/emacsconf-schedule.el +++ b/emacsconf-schedule.el @@ -347,7 +347,7 @@ Each function should take the info and manipulate it as needed, returning the ne "green"))) (defun emacsconf-schedule-svg (width height &optional info) - (setq info (or info (emacsconf-get-talk-info))) + (setq info (emacsconf-prepare-for-display (or info (emacsconf-get-talk-info)))) (let ((days (seq-group-by (lambda (o) (format-time-string "%Y-%m-%d" (plist-get o :start-time) emacsconf-timezone)) (sort (seq-filter (lambda (o) diff --git a/emacsconf-stream.el b/emacsconf-stream.el index e2b4962..8fdfcbc 100644 --- a/emacsconf-stream.el +++ b/emacsconf-stream.el @@ -463,5 +463,141 @@ This uses the BBB room if available, or the IRC channel if not." ;; :channel "emacsconf-gen" ;; :qa-info "https://emacsconf.org/current/community/room/") ;; ) + +;; Updates live.emacsconf.org +(defvar emacsconf-stream-live-index "/ssh:orga@front0.emacsconf.org:/var/www/live.emacsconf.org/index.html") + +(defun emacsconf-stream-shift-days () + "Return a label for the conference days." + (let ((start + (date-to-time (car (sort (mapcar (lambda (o) (plist-get o :start)) + emacsconf-shifts) + 'string<)))) + (end + (date-to-time (car (last (sort (mapcar (lambda (o) (plist-get o :end)) + emacsconf-shifts) + 'string<)))))) + (if (string= (format-time-string "%Y-%m-%d" start emacsconf-timezone) + (format-time-string "%Y-%m-%d" end emacsconf-timezone)) + (format-time-string "%A, %b %-d, %Y" + start emacsconf-timezone) + (concat + (format-time-string "%b %-d (%a)" + start emacsconf-timezone) + " to " + (format-time-string "%b %-d (%a), %Y" + end emacsconf-timezone))))) + +(defvar emacsconf-status-timezones '("US/Eastern" "UTC" "Europe/Berlin")) +(defun emacsconf-stream-update-status-page () + (interactive) + (with-temp-file emacsconf-stream-live-index + (insert + (emacsconf-replace-plist-in-string + (list :name emacsconf-name + :year emacsconf-year + :base-url emacsconf-base-url + :days (emacsconf-stream-shift-days) + :timezone-info + (mapconcat (lambda (zone) (concat "<th>" zone "</th>")) + emacsconf-status-timezones "") + :stream-info + (mapconcat + (lambda (track) + (emacsconf-replace-plist-in-string + (append (list :stream-base emacsconf-stream-base) + track) + "<tr><td>${id}</td><td><a href=\"${stream-base}${id}.webm\">${stream-base}${id}.webm</a></td></tr> +<tr><td>${id}-480p</td><td><a href=\"${stream-base}${id}-480p.webm\">${stream-base}${id}-480p.webm</a></td></tr>")) + emacsconf-tracks "\n") + :watch-info + (mapconcat + (lambda (track) + (let ((start-time (date-to-time (concat emacsconf-date "T" (plist-get track :start) emacsconf-timezone-offset)))) + (emacsconf-replace-plist-in-string + (append + (list + :time-info + (mapconcat + (lambda (zone) + (format-time-string "<td>%l:%M %p %Z</td>" start-time zone)) + emacsconf-status-timezones + "")) + track) + "<tr> + <td><a href=\"${watch}\"><strong>${name}</strong></a></td><td class=\"status-${status}\">${status}</td>${time-info} +</tr>"))) + emacsconf-tracks "\n") + ) + "<!doctype html> +<html lang=\"en\"> + <head> + <meta charset=\"utf-8\"> + <meta name=viewport content=\"width=device-width, initial-scale=1\"> + <meta name=\"description\" content=\"${name} Livestreams\"/> + <title>${name} ${year} ~ Live</title> + <link rel=\"stylesheet\" href=\"/style.css\" /> + </head> + <body> + <header> + <h1><a href=\"${base-url}${year}/\">${name} ${year}</a> Livestreams</h1> + <h3>December 3 (Saturday) and 4 (Sunday), 2022</h3> + </header> + <main> + <table> + <thead> + <tr> + <th>track</th> + <th>status</th> +${timezone-info} + </tr> + </thead> + <tbody> +${watch-info} + </tbody> + </table> + <p> + Click on the track names above to watch the stream in your browser. + </p> + <h4>Watching the streams directly</h4> + <p> + You can also watch the streams in any media player that supports streaming. + </p> + <table> + <thead> + <tr> + <th>track</th> + <th>stream address</th> + </tr> + </thead> + <tbody> +${stream-info} + </tbody> + </table> + <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. + </p> + <p> + Examples: + </p> +<pre> +mpv URL +vlc URL +ffplay URL +</pre> + </main> + <footer> + <p> + If you experience any disruptions, please check our status page at + <a href=\"//status.emacsconf.org\">status.emacsconf.org</a> for updates + on the status of various parts of our infrastructure, and instructions + on how to get in touch with us about disruptions. + </p> + </footer> + </body> +</html> +")))) (provide 'emacsconf-stream) ;;; emacsconf-stream.el ends here diff --git a/emacsconf.el b/emacsconf.el index a67abc6..873a9ea 100644 --- a/emacsconf.el +++ b/emacsconf.el @@ -969,11 +969,17 @@ (defvar emacsconf-tracks '( (:name "General" :color "peachpuff" :id "gen" :channel "emacsconf-gen" - :tramp "/ssh:emacsconf-gen@res.emacsconf.org#46668:") + :watch "https://live.emacsconf.org/2022/watch/gen/" + :tramp "/ssh:emacsconf-gen@res.emacsconf.org#46668:" + :start "09:00" :end "17:00" + :status "offline") (:name "Development" :color "skyblue" :id "dev" :channel "emacsconf-dev" - :tramp "/ssh:emacsconf-dev@res.emacsconf.org#46668:"))) + :watch "https://live.emacsconf.org/2022/watch/dev/" + :tramp "/ssh:emacsconf-dev@res.emacsconf.org#46668:" + :start "09:00" :end "17:00" + :status "offline"))) -(defvar emacsconf-shifts (list (list :id "sat-am-gen" :track "General" :start "2022-12-03T08:00:00-0500" :end "2022-12-03T12:00:00-0500" :host "zaeph" :streamer "corwin" :checkin "sachac" :irc "sachac" :pad "publicvoit") (list :id "sat-pm-gen" :track "General" :start "2022-12-03T13:00:00-0500" :end "2022-12-03T18:00:00-0500" :host "zaeph" :streamer "corwin" :checkin "FlowyCoder" :irc "dto" :pad "publicvoit") (list :id "sat-am-dev" :track "Development" :start "2022-12-03T08:00:00-0500" :end "2022-12-03T12:00:00-0500" :host "bandali" :streamer "bandali" :checkin "sachac" :irc "dto") (list :id "sat-pm-dev" :track "Development" :start "2022-12-03T13:00:00-0500" :end "2022-12-03T18:00:00-0500" :host "vetrivln" :streamer "bandali" :checkin "FlowyCoder" :irc "vetrivln") (list :id "sun-am-gen" :track "General" :start "2022-12-04T08:00:00-0500" :end "2022-12-04T12:00:00-0500" :host "zaeph" :streamer "corwin" :checkin "sachac" :irc "sachac" :pad "publicvoit") (list :id "sun-pm-gen" :track "General" :start "2022-12-04T13:00:00-0500" :end "2022-12-04T18:00:00-0500" :host "zaeph" :streamer "jman" :checkin "FlowyCoder" :irc "dto" :pad "publicvoit") (list :id "sun-am-dev" :track "Development" :start "2022-12-04T08:00:00-0500" :end "2022-12-04T12:00:00-0500" :host "bandali" :streamer "bandali" :checkin "sachac" :irc "dto") (list :id "sun-pm-dev" :track "Development" :start "2022-12-04T13:00:00-0500" :end "2022-12-04T18:00:00-0500" :host "vetrivln" :streamer "bandali" :checkin "FlowyCoder" :irc "vetrivln")) +(defvar emacsconf-shifts (list (list :id "sat-am-gen" :track "General" :start "2022-12-03T08:00:00-0500" :end "2022-12-03T12:00:00-0500" :host "zaeph" :streamer "corwin" :checkin "sachac" :irc "sachac" :pad "publicvoit" :coord "sachac") (list :id "sat-pm-gen" :track "General" :start "2022-12-03T13:00:00-0500" :end "2022-12-03T18:00:00-0500" :host "zaeph" :streamer "corwin" :checkin "FlowyCoder" :irc "dto" :pad "publicvoit" :coord "sachac") (list :id "sat-am-dev" :track "Development" :start "2022-12-03T08:00:00-0500" :end "2022-12-03T12:00:00-0500" :host "bandali" :streamer "bandali" :checkin "sachac" :irc "dto" :coord "sachac") (list :id "sat-pm-dev" :track "Development" :start "2022-12-03T13:00:00-0500" :end "2022-12-03T18:00:00-0500" :host "vetrivln" :streamer "bandali" :checkin "FlowyCoder" :irc "vetrivln" :coord "sachac") (list :id "sun-am-gen" :track "General" :start "2022-12-04T08:00:00-0500" :end "2022-12-04T12:00:00-0500" :host "zaeph" :streamer "corwin" :checkin "sachac" :irc "sachac" :pad "publicvoit" :coord "sachac") (list :id "sun-pm-gen" :track "General" :start "2022-12-04T13:00:00-0500" :end "2022-12-04T18:00:00-0500" :host "zaeph" :streamer "jman" :checkin "FlowyCoder" :irc "dto" :pad "publicvoit" :coord "sachac") (list :id "sun-am-dev" :track "Development" :start "2022-12-04T08:00:00-0500" :end "2022-12-04T12:00:00-0500" :host "bandali" :streamer "bandali" :checkin "sachac" :irc "dto" :coord "sachac") (list :id "sun-pm-dev" :track "Development" :start "2022-12-04T13:00:00-0500" :end "2022-12-04T18:00:00-0500" :host "vetrivln" :streamer "bandali" :checkin "FlowyCoder" :irc "vetrivln" :coord "sachac")) "Shift information derived from the organizer's notebook.") (defun emacsconf-get-track (name) @@ -1155,6 +1161,11 @@ Filter by TRACK if given. Use INFO as the list of talks." (re-search-forward (concat "\\<" (regexp-quote input)) nil t) (goto-char (match-beginning 0)))) (insert "\n") + (when (< (- (line-end-position) (point)) fill-column) + (save-excursion + (goto-char (line-end-position)) + (insert " ") + (delete-char 1))) (setq last-input input) (recenter) (undo-boundary))))) |