diff options
-rw-r--r-- | emacsconf-publish.el | 3 | ||||
-rw-r--r-- | emacsconf-schedule.el | 43 | ||||
-rw-r--r-- | emacsconf.el | 8 |
3 files changed, 36 insertions, 18 deletions
diff --git a/emacsconf-publish.el b/emacsconf-publish.el index e4de38d..07097a0 100644 --- a/emacsconf-publish.el +++ b/emacsconf-publish.el @@ -899,7 +899,8 @@ Entries are sorted chronologically, with different tracks interleaved." (defun emacsconf-publish-backstage-org-on-state-change (talk) (save-window-excursion (emacsconf-with-talk-heading talk - (when (member org-state '("PROCESSING" "TO_ASSIGN")) + (when (and (member org-state '("PROCESSING" "TO_ASSIGN")) + (not (plist-get talk :video-time))) (emacsconf-cache-video-data talk)) (when (member org-state '("TO_CAPTION")) (unless (or noninteractive (org-entry-get (point) "CAPTIONER")) diff --git a/emacsconf-schedule.el b/emacsconf-schedule.el index a7427a5..532eaab 100644 --- a/emacsconf-schedule.el +++ b/emacsconf-schedule.el @@ -94,7 +94,7 @@ Each function should take the info and manipulate it as needed, returning the ne (when (plist-get o :slug) (plist-put o :buffer (number-to-string - (if (string-match "live" (plist-get o :q-and-a)) + (if (string-match "live" (or (plist-get o :q-and-a) "")) (min (string-to-number (plist-get o :max-time)) emacsconf-schedule-default-buffer-minutes-for-live-q-and-a) emacsconf-schedule-default-buffer-minutes)))) @@ -414,19 +414,24 @@ Each function should take the info and manipulate it as needed, returning the ne ;;; Schedule summary -(defun emacsconf-schedule-round-start-to-five (o) - (let* ((start-time (plist-get o :start)) - (decoded-time (decode-time start-time "America/Toronto")) - (duration (* (string-to-number (plist-get o :time)) 60)) - (minutes (elt decoded-time 1)) - offset end-time) - (unless (= (mod minutes 5) 0) - (setq offset (seconds-to-time (* 60 (- 5 (mod minutes 5)))) - end-time (time-add start-time (time-to-seconds duration))) - (plist-put o :scheduled (format "%s-%s" (format-time-string "%Y-%m-%d %H:%M" (time-add start-time offset)) - (format-time-string "%H:%M" (time-add end-time offset)))) - (plist-put o :start-time (time-add start-time offset)) - (plist-put o :end-time (time-add end-time offset))))) +(defun emacsconf-schedule-round-start-to-five (info) + (mapcar (lambda (o) + (when (plist-get o :time) + (let* ((start-time (plist-get o :start)) + (decoded-time (decode-time start-time emacsconf-timezone)) + (duration (* (string-to-number (plist-get o :time)) 60)) + (minutes (elt decoded-time 1)) + offset end-time) + (unless (= (mod minutes 5) 0) + (setq offset (seconds-to-time (* 60 (- 5 (mod minutes 5)))) + end-time (time-add start-time (time-to-seconds duration))) + (plist-put o :scheduled (format "%s-%s" + (format-time-string "%Y-%m-%d %H:%M" (time-add start-time offset)) + (format-time-string "%H:%M" (time-add end-time offset)))) + (plist-put o :start-time (time-add start-time offset)) + (plist-put o :end-time (time-add end-time offset))))) + o) + info)) ;(emacsconf-update-schedules #'emacsconf-round-start-to-five) (defvar emacsconf-schedule-default-buffer-minutes-for-live-q-and-a 15) @@ -443,6 +448,13 @@ Each function should take the info and manipulate it as needed, returning the ne o) info)) +(defun emacsconf-schedule-allocate-video-time (info) + (mapcar (lambda (o) + (when (plist-get o :video-time) + (plist-put o :time (plist-get o :video-time))) + o) + info)) + (defun emacsconf-schedule-allocate-max-time (info) (mapcar (lambda (o) (when (plist-get o :max-time) @@ -596,11 +608,12 @@ Both start and end time are tested." tracks)) (defmacro emacsconf-schedule-test (filename &rest varlist) + (declare (debug t)) `(let* (,@varlist) (let* ((schedule (emacsconf-schedule-prepare arranged)) (validation (or (emacsconf-schedule-validate schedule) ""))) (with-temp-file ,filename - (svg-print (emacsconf-schedule-svg 800 200 (emacsconf-schedule-inflate-tracks tracks schedule)))) + (svg-print (emacsconf-schedule-svg 800 200 schedule))) (mapconcat (lambda (o) (format "- %s\n" o)) (append validation (list (format "[[file:%s]]" filename))))))) (defun emacsconf-schedule-format-summary-row (o) diff --git a/emacsconf.el b/emacsconf.el index c16f657..36d21b2 100644 --- a/emacsconf.el +++ b/emacsconf.el @@ -138,8 +138,9 @@ (copy-file file (expand-file-name (file-name-nondirectory file) emacsconf-backstage-dir) t) - (when (and emacsconf-cache-dir (not (string= (expand-file-name default-directory) - (expand-file-name emacsconf-cache-dir)))) + (when (and emacsconf-cache-dir + (not (string= (expand-file-name (file-name-nondirectory file) default-directory) + (expand-file-name (file-name-nondirectory file) emacsconf-cache-dir)))) (copy-file file (expand-file-name (file-name-nondirectory file) emacsconf-cache-dir) t))) @@ -944,6 +945,9 @@ (:name "Development" :color "skyblue" :id "dev" :channel "emacsconf-dev" :tramp "/ssh:emacsconf-dev@res.emacsconf.org#46668:"))) +(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")) + "Shift information derived from the organizer's notebook.") + (defun emacsconf-get-track (name) (when (listp name) (setq name (plist-get name :track))) (seq-find (lambda (track) (or (string= name (plist-get track :name)) |