From 7a6fd1aa2b9b56215c2e4884ed3f185fe8e9f44a Mon Sep 17 00:00:00 2001 From: Sacha Chua Date: Wed, 23 Nov 2022 13:14:04 -0500 Subject: hyperlists --- emacsconf-pad.el | 210 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 116 insertions(+), 94 deletions(-) (limited to 'emacsconf-pad.el') diff --git a/emacsconf-pad.el b/emacsconf-pad.el index ba216ce..afd734b 100644 --- a/emacsconf-pad.el +++ b/emacsconf-pad.el @@ -258,7 +258,7 @@ ${next-talk-list} (defun emacsconf-pad-prepopulate-all-talks (&optional info) (interactive) (mapc #'emacsconf-pad-prepopulate-talk-pad - (emacsconf-include-next-talks (or info (emacsconf-get-talk-info)) emacsconf-pad-number-of-next-talks))) + (emacsconf-include-next-talks (or info (emacsconf-get-talk-info)) emacsconf-pad-number-of-next-talks))) (defun emacsconf-pad-export-initial-content (o file) (interactive @@ -296,6 +296,8 @@ ${next-talk-list} (not (string= cached-last-modified (number-to-string .data.lastEdited)))))))) +;;; Hyperlists + (defun emacsconf-pad-export-initial-content-for-hyperlists (dir &optional info) (interactive (list (read-file-name "Output directory: " nil nil nil nil 'file-directory-p))) (setq info (emacsconf-prepare-for-display (emacsconf-get-talk-info))) @@ -328,12 +330,13 @@ ${next-talk-list} :track-id (plist-get (emacsconf-get-track (plist-get shift :track)) :id) :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))))) + :coord (emacsconf-surround "COORD-" (plist-get shift :coord) "" "COORD") + :checkin-pad (concat emacsconf-pad-base "checkin-" (downcase (format-time-string "%a" (date-to-time (plist-get shift :start))))))) + (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 (append (list :index (concat emacsconf-pad-base @@ -351,7 +354,7 @@ ${next-talk-list} " Setup
  • [ ] ${coord}: ssh -t orga@live0.emacsconf.org 'screen -S restream-${track-id}-youtube /home/orga/restream-${track-id}-youtube.sh' and then confirm
  • @@ -376,31 +380,18 @@ ${next-talk-list} " "Talks " "Teardown ")) ))) @@ -408,42 +399,46 @@ ${next-talk-list} (defun emacsconf-pad-format-checkin-hyperlist (talk) (emacsconf-replace-plist-in-string (append (list :time - (format-time-string "%H:%M" (plist-get talk :checkin-time) emacsconf-timezone)) + (format-time-string "%H:%M" (plist-get talk :checkin-time) emacsconf-timezone) + :start + (format-time-string "%H:%M" (plist-get talk :start-time) emacsconf-timezone)) talk) (pcase (or (plist-get talk :q-and-a) "") ((rx "live") - "
  • ${time} ${checkin}: By this time, ${speakers} should be checked into ${bbb-backstage} and set as moderator(s); let #emacsconf-org know if they're missing
  • ") + "
  • [ ] ${time} ${checkin}: ${speakers} should be checked into ${bbb-backstage} and set as moderator(s) for talk time of ${start}
  • ") ((rx "IRC") - "
  • ${time} ${checkin}: Double-check ${speakers} in ${channel}; let #emacsconf-org know if not
  • ") + "
  • [ ] ${time} ${checkin}: ${speakers} should be in #${channel} (${irc-nick}) for talk time of ${start}
  • ") ((rx "Mumble") - "
  • ${time} ${checkin}: Double-check ${speakers} on Mumble; let #emacsconf-org know if not
  • ") + "
  • [ ] ${time} ${checkin}: ${speakers} should be Mumble for talk time of ${start}
  • ") (_ "")))) (defun emacsconf-pad-prepopulate-checkins (&optional info) (interactive) - (setq info (or info (emacsconf-prepare-for-display info))) - (mapc (lambda (day) - (let ((pad-id (concat "checkin-" (downcase (format-time-string "%a" (plist-get (cadr day) :checkin-time)))))) - (emacsconf-create-pad) - (emasconf-set-pad) - (concat "")) - ) - (seq-group-by (lambda (talk) - (format-time-string "%A, %b %-e, %Y" (plist-get talk :checkin-time))) - info)))) - - ) + (setq info (or info (emacsconf-prepare-for-display (emacsconf-get-talk-info)))) + (mapc + (lambda (day) + (let ((pad-id (concat "checkin-" (downcase (format-time-string "%a" (plist-get (cadr day) :checkin-time)))))) + (emacsconf-pad-create-pad pad-id) + (emacsconf-pad-set-html + pad-id + (replace-regexp-in-string + "${checkin}: " "" + (concat + (car day) + ""))))) + (seq-group-by (lambda (talk) + (format-time-string "%A, %b %-e, %Y" (plist-get talk :checkin-time))) + info))) (defun emacsconf-pad-prepopulate-shift-hyperlist (shift &optional info) (interactive (list (completing-read "Shift: " @@ -464,81 +459,108 @@ ${next-talk-list} (interactive) (let ((info (emacsconf-prepare-for-display (emacsconf-get-talk-info)))) (mapc (lambda (shift) - (emacsconf-pad-prepopulate-shift-hyperlists info))) + (emacsconf-pad-prepopulate-shift-hyperlists info)) emacsconf-shifts))) ;; Related: emacsconf-talk-hyperlist (defun emacsconf-pad-talk-hyperlist (talk &optional do-insert) (interactive (list (emacsconf-complete-talk-info) t)) (let* ((track-id (plist-get (emacsconf-get-track talk) :id)) + (next-talk (car (plist-get talk :next-talks))) (modified-talk (apply #'append (list :year emacsconf-year :track-id track-id + :media-base emacsconf-media-base-url :mumble (concat emacsconf-id "-" track-id) + :next-talk-in-5 (if next-talk (format-time-string "%H:%M" (time-subtract (plist-get next-talk :start-time) (seconds-to-time 300)) emacsconf-timezone) "") + :next-talk-in-1 (if next-talk (format-time-string "%H:%M" (time-subtract (plist-get next-talk :start-time) (seconds-to-time 60)) emacsconf-timezone) "") :ssh "ssh orga@res.emacsconf.org -p 46668 " - :ssh-audio (format "ex: ssh emacsconf-%s@res.emacsconf.org -p 46668 \"%s-vol 85%%\" (or %s-louder, %s-quieter)" track-id track-id track-id track-id)) + :ssh-track (format "ssh %s-%s@res.emacsconf.org -p 46668 " emacsconf-id track-id) + :ssh-audio (format "ex: ssh emacsconf-%s@res.emacsconf.org -p 46668 \"qa-vol 85%%\" (or qa-louder, qa-quieter, mum-vol, mum-louder, mum-quieter)" track-id)) talk (mapcar (lambda (status) (list (intern (concat ":ssh-" (replace-regexp-in-string "_" "" (downcase status)))) - (format "ssh orga@res.emacsconf.org -p 46668 \"~/scripts/update-task-status.sh %s . %s\"" + (format "ssh orga@res.emacsconf.org -p 46668 \"~/scripts/update-task-status.sh %s . %s\"" (plist-get talk :slug) status))) '("PLAYING" "OPEN_Q" "CLOSED_Q")))) - (result + result) + (setq result (emacsconf-replace-plist-in-string modified-talk - (format "
  • %s export SLUG=%s %s %s%s\n
  • " + (format "
  • %s %s (Talk: %s, Q&A: %s) %s %s\n
  • " (format-time-string "%H:%M" (plist-get talk :start-time) emacsconf-timezone) (plist-get talk :slug) + (if (plist-get talk :video-file) "recorded" "live") + (or (plist-get talk :q-and-a) "none") (plist-get talk :title) - emacsconf-base-url - (plist-get talk :url) - emacsconf-base-url - (plist-get talk :url) - (emacsconf-surround - "
    " (plist-get talk :hyperlist-note) "
    " - "") - (pcase (or (plist-get talk :q-and-a) "") - ((rx "live") - "
  • [ ] ${stream}: Display the in-between slide https://media.emacsconf.org/${year}/in-between/${slug}.png
  • + (plist-get talk :absolute-url) + (plist-get talk :absolute-url) + + (concat + (emacsconf-surround "
  • " (plist-get talk :hyperlist-note) "
  • " "") + "
  • [ ] ${stream}: Display the in-between slide: ${ssh-track} and run firefox ${in-between-url} &
  • [ ] ${host}: Connect to the ${mumble} channel in Mumble and introduce the talk: ${intro-note}
  • -
  • [ ] ${stream}: Start playing the talk: ${ssh-playing}
  • -
  • [ ] ${host}: Join the Q&A room at ${bbb-room} and open the pad at ${pad-url}; optionally open IRC for ${channel} (${webchat-url})
  • +" + (if (plist-get talk :video-file) + "
  • [ ] ${stream}: Mark the talk as playing: ${ssh-playing} and confirm that it plays. If it doesn't play, go to the ~/stream directory and use track-mpv to play the video file.
  • " + "
  • [ ] ${stream}: LIVE talk: Mark the talk as playing: ${ssh-playing} and arrange windows (backup URL for BBB if it doesn't open: ${bbb-backstage}). Adjust audio as needed
  • ") + (pcase (or (plist-get talk :q-and-a) "") + ((rx "live") + (concat + "
  • [ ] ${host}: Join the Q&A room at ${bbb-backstage} and open the pad at ${pad-url}; optionally open IRC for ${channel} (${webchat-url})
  • [ ] [? speaker missing?] ${host}: Let #emacsconf-org know so that we can text or call the speaker
  • -
  • [ ] ${stream}: After the talk, open the Q&A window and the pad: ${ssh-closedq}
  • +
  • [ ] ${stream}: After the talk, open the Q&A window and the pad: ${ssh-closedq} + +
  • [ ] ${stream}: Give the host the go-ahead via Mumble or #emacsconf-org
  • [ ] ${host}: Start recording and read questions
  • [ ] ${stream}: Adjust the audio levels as needed: ${ssh-audio}
  • -
  • [ ] ${host}: Decide when to open the Q&A and let the streamer know
  • -
  • [ ] ${stream}: Mark the Q&A as open: ${ssh-openq}
  • -
  • [ ] ${host}: Announce that people can join using the URL on the talk page
  • -
  • [? Open Q&A is still going on and it's about five minutes before the next talk] +
  • [ ] ${host}: Decide when to open the Q&A and let ${coord} know privately
  • +
  • [ ] ${coord}: Mark the Q&A as open: ${ssh-openq} and double-check the redirect at ${bbb-redirect}. If the redirect doesn't work, ssh media \"cp ~/${year}/backstage/assets/redirects/open/bbb-${slug}.html ~/${year}/current/\" . Confirm the redirect and let ${host} know.
  • +
  • [ ] ${host}: Announce that people can join using the URL on the talk page or ask questions on the pad or IRC channel
  • +
  • ${next-talk-in-5} [? Open Q&A is still going on and it's about five minutes before the next talk]
  • -
  • [? Open Q&A is still going on and it's about two minutes before the next talk] +
  • ${next-talk-in-1} [? Open Q&A is still going on and it's about a minute before the next talk]
  • [? Q&A is done early] -
  • [ ] ${stream}: Close the Q&A windows and move on to the next talk
  • + +")) + ((rx "irc") + " +
  • [ ] ${stream}: Update the task status: ${ssh-closedq} # this should open the pad and IRC; arrange the windows +
  • +
  • [ ] ${stream}: Update the task status: ${ssh-openq} # this should not make any visible changes, just update the task status
  • +
  • [ ] ${host}: Announce that people can ask questions in the ${channel} IRC channel.
  • ") - ((rx "irc") - "
  • [ ] ${stream}: Display the in-between slide https://media.emacsconf.org/${year}/in-between/${slug}.png
  • -
  • [ ] ${host}: Connect to the ${mumble} channel in Mumble and introduce the talk
  • -
  • [ ] ${stream}: ${ssh-playing}
  • -
  • [ ] ${stream}: Open the IRC channel (${channel}) and the pad, and arrange the windows: ${ssh-closedq}
  • -
  • [ ] ${stream}: When it's time for the next talk, close the Q&A windows and move on to the next talk
  • + ((rx "Mumble") + " +
  • [ ] ${stream}: Bring the speaker's Mumble login over to the ${channel} channel in Mumble. Confirm that Mumble is audible and adjust audio as needed: ssh emacsconf-${track-id}@res.emacsconf.org -p 46668 \"mum-vol 85%%\" (or mum-louder, mum-quieter)
  • +
  • [ ] ${stream}: Mark the Q&A as closed: ${ssh-closedq} . This should display the QA slide (backup: ${ssh-track} and run firefox ${qa-slide-url} &)
  • +
  • [ ] ${stream}: Update the task status: ${ssh-openq} # this should not make any visible changes, just update the task status
  • +
  • [ ] ${host}: Announce that people can ask questions in the pad or on the ${channel} IRC channel.
  • ") - (_ - "
  • [ ] ${stream}: Display the in-between slide https://media.emacsconf.org/${year}/in-between/${slug}.png
  • -
  • [ ] ${host}: Connect to the ${mumble} channel in Mumble and introduce the talk
  • -
  • [ ] ${stream}: Start the talk: ${ssh-playing}
  • -
  • [ ] ${stream}: Open the IRC channel (${channel}) and the pad, and arrange the windows: ${ssh-closedq}
  • -
  • [ ] ${stream}: When it's time for the next talk, close the Q&A windows and move on to the next talk
  • -")))))) + ((rx "after") + " +
  • [ ] ${stream}: Update the task status: ${ssh-closedq} # this should open the pad and IRC; arrange the windows +
  • +
  • [ ] ${host}: Announce that people can ask questions in the pad or on the ${channel} IRC channel, and that the speaker will follow up later.
  • +
  • [ ] ${stream}: Update the task status: ${ssh-openq} # this should not make any visible changes, just update the task status
  • " + ) + (_ + "
  • [ ] ${stream}: Open the IRC channel (${channel}) and the pad, and arrange the windows: ${ssh-closedq}
  • +")) + "
  • [ ] ${stream}: When it's time for the next talk, close the Q&A windows and move on to the next talk
  • ")))) (if do-insert (insert result)) result)) -- cgit v1.2.3