From bbab65f0e5d668e94408551dc7b055a47a9e4b0a Mon Sep 17 00:00:00 2001 From: Sacha Chua Date: Fri, 25 Nov 2022 12:27:59 -0500 Subject: intro --- emacsconf-pad.el | 49 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 46 insertions(+), 3 deletions(-) diff --git a/emacsconf-pad.el b/emacsconf-pad.el index 5f53d7f..b9f007c 100644 --- a/emacsconf-pad.el +++ b/emacsconf-pad.el @@ -473,6 +473,39 @@ ${next-talk-list} (emacsconf-pad-prepopulate-shift-hyperlists info)) emacsconf-shifts))) +(defun emacsconf-pad-expand-intro (talk) + (cond + ((null (plist-get talk :speakers)) + (format "Next up, we have \"%s\"." (plist-get talk :title))) + ((plist-get talk :intro-note) + (format "The next talk is called \"%s\". %s" (plist-get talk :title) + (plist-get talk :intro-note))) + (t + (let ((pronoun (pcase (plist-get talk :pronouns) + ((rx "she") "She") + ((rx "they") "They") + ((rx "she") "He") + (_ (or (plist-get talk :pronouns) ""))))) + (format "The next talk is called \"%s\"\", by %s.%s" (plist-get talk :title) + (replace-regexp-in-string ", \\([^,]+\\)$" + ", and \\1" + (plist-get talk :speakers)) + (pcase (plist-get talk :q-and-a) + ((or 'nil "") "") + ((rx "after") " We'll collect questions via Etherpad and IRC to send to the speaker, and we'll post the speaker's answers on the talk page afterwards.") + ((rx "IRC") + (format " %s will answer questions via IRC in the #%s channel." + pronoun + (plist-get talk :channel))) + ((rx "Mumble") + (format " %s will answer questions via Etherpad." + pronoun + )) + ((rx "live") + (format " %s will answer questions via BigBlueButton. You can join using the URL from the talk page or ask questions through Etherpad or IRC." + pronoun + )))))))) + ;; Related: emacsconf-talk-hyperlist (defun emacsconf-pad-talk-hyperlist (talk &optional do-insert) (interactive (list (emacsconf-complete-talk-info) t)) @@ -484,6 +517,13 @@ ${next-talk-list} (list :year emacsconf-year :track-id track-id + :intro-note + (emacsconf-pad-expand-intro talk) + (if (plist-get talk :intro-note) + (format "The next talk is called \"%s\". %s" (plist-get talk :title) + (plist-get talk :intro-note)) + (format "The next talk is called \"%s\", by %s." (plist-get talk :title) + (plist-get talk :speakers))) :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) "") @@ -580,13 +620,16 @@ ${next-talk-list} (emacsconf-pad-create-pad "intros") (emacsconf-pad-set-html "intros" - (concat "

https://media.emacsconf.org/2022/backstage/