From 59333798b0cd7fd285f5e0b3550bb926eab3c38c Mon Sep 17 00:00:00 2001 From: Sacha Chua Date: Tue, 22 Nov 2022 08:34:20 -0500 Subject: generate status page for live.emacsconf.org --- emacsconf-pad.el | 84 ++++++++++++++++++++++--------- emacsconf-publish.el | 32 ++++++++++-- emacsconf-schedule.el | 2 +- emacsconf-stream.el | 136 ++++++++++++++++++++++++++++++++++++++++++++++++++ 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 - "

" (plist-get shift :id) "

" - (emacsconf-replace-plist-in-string - shift - "

Host: ${host}, Streamer: ${streamer}, IRC: ${irc}, Pad: ${pad}, Check-in: ${checkin}

") - (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 + "

" (plist-get shift :id) "

" + "

Host: ${host}, Streamer: ${streamer}, IRC: ${irc}, Pad: ${pad}, Check-in: ${checkin}, Coord: ${coord}

")) + (emacsconf-replace-plist-in-string + prefixed + (concat + " Setup -") - "")) + +
  • [ ] ${coord}: ssh -t orga@live0.emacsconf.org 'screen -S restream-${track-id}-youtube /home/orga/restream-${track-id}-youtube.sh' and then confirm
  • +
  • [ ] ${coord}: ssh -t orga@live0.emacsconf.org 'screen -S restream-${track-id}-toobnix /home/orga/restream-${track-id}-toobnix.sh' and then confirm
  • +
  • [ ] ${coord}: update the status page on live.emacsconf.org
  • + +" + "" + "Teardown +")) + ))) (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 " - " (plist-get talk :end) "" "") :track-info (emacsconf-surround (format " " (or (plist-get talk :track) "")) (plist-get talk :track) "" "") :q-info (emacsconf-surround " Q&A: " (plist-get talk :q-and-a) "; " "") + :pad-info (emacsconf-surround " Etherpad; " "") :slug-info (emacsconf-surround " id:" (plist-get talk :slug) "" "") :speaker-info (emacsconf-surround "
    " (plist-get talk :speakers-with-pronouns) "
    " "") :resources-info (emacsconf-surround "" ""))) "
    -
    ${start-info}${end-info}${track-info}${q-info}${slug-info}
    +
    ${start-info}${end-info}${track-info}${pad-info}${q-info}${slug-info}
    ${speaker-info} ${resources-info} @@ -1745,7 +1748,30 @@ ${title-info}
    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
    -
    " + + +

    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 https://status.emacsconf.org for updates on the +status of various parts of our infrastructure, and instructions on how +to get in touch with us about disruptions.

    + +

    If you prefer, you can watch the livestream via Toobnix: +General track, +Development track. +Pre-recorded videos and replays will also be available on Toobnix in +the EmacsConf channel.

    + +

    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.

    + +" + "")) (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 "" zone "")) + emacsconf-status-timezones "") + :stream-info + (mapconcat + (lambda (track) + (emacsconf-replace-plist-in-string + (append (list :stream-base emacsconf-stream-base) + track) + "${id}${stream-base}${id}.webm +${id}-480p${stream-base}${id}-480p.webm")) + 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 "%l:%M %p %Z" start-time zone)) + emacsconf-status-timezones + "")) + track) + " + ${name}${status}${time-info} +"))) + emacsconf-tracks "\n") + ) + " + + + + + + ${name} ${year} ~ Live + + + +
    +

    ${name} ${year} Livestreams

    +

    December 3 (Saturday) and 4 (Sunday), 2022

    +
    +
    + + + + + +${timezone-info} + + + +${watch-info} + +
    trackstatus
    +

    + Click on the track names above to watch the stream in your browser. +

    +

    Watching the streams directly

    +

    + You can also watch the streams in any media player that supports streaming. +

    + + + + + + + + +${stream-info} + +
    trackstream address
    +

    + 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. +

    +

    + Examples: +

    +
    +mpv URL
    +vlc URL
    +ffplay URL
    +
    +
    + + + +")))) (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))))) -- cgit v1.2.3