From f16a68d2c43a38ac64de5a38ddcd87db09e737bf Mon Sep 17 00:00:00 2001 From: Sacha Chua Date: Thu, 10 Nov 2022 08:04:31 -0500 Subject: hyperlist, reload --- emacsconf-publish.el | 106 +++++++++++++++++++++++++++++---------------------- 1 file changed, 60 insertions(+), 46 deletions(-) (limited to 'emacsconf-publish.el') diff --git a/emacsconf-publish.el b/emacsconf-publish.el index a3c0323..72683bc 100644 --- a/emacsconf-publish.el +++ b/emacsconf-publish.el @@ -151,7 +151,31 @@ talk "
${video-html}
${extra}
${resources}${chapter-list}
")))) +(defun emacsconf-publish-format-res-talks (info) + (mapconcat + (lambda (o) + (concat + "" + (format + "" + (plist-get o :slug)) + (plist-get o :qa-link) + "" + "" (if (plist-get o :pad-url) + (format "Open pad" (plist-get o :pad-url)) + "") + "" + "" (format "Open chat" (plist-get o :webchat-url)) + "" + "" + "" (format-time-string "%-l:%M" (plist-get o :start-time) emacsconf-timezone) "" + "" (or (plist-get o :slug) "") "" + "" (or (plist-get o :title) "") "" + "")) + info + "\n")) (defun emacsconf-publish-res-index () + "Publish BBB room URLs and pad links for volunteer convenience." (interactive) (let ((emacsconf-use-absolute-url t) (emacsconf-base-url "") @@ -166,43 +190,42 @@ o) o))) (emacsconf-prepare-for-display (emacsconf-get-talk-info))))) - (mapc (lambda (track) - (let ((track-talks (seq-filter (lambda (o) (string= (plist-get o :track) - (plist-get track :name))) - info))) - (with-temp-file (expand-file-name (format "index-%s.html" (plist-get track :id)) emacsconf-res-dir) - (insert - " + (mapc + (lambda (track) + (let* + ((track-talks (seq-filter (lambda (o) (string= (plist-get o :track) + (plist-get track :name))) + info)) + (result + (concat + "
" - (with-temp-buffer - (svg-print (emacsconf-schedule-svg 800 300 info)) - (buffer-string)) - "
" - (mapconcat - (lambda (o) - (concat - "" - (format - "" - "" - "" - "" - "" - "" - "")) - (seq-filter (lambda (talk) (string= (plist-get talk :track) - (plist-get track :name))) info) - "\n") - "
" - (plist-get o :slug)) - (plist-get o :qa-link) - "" (if (plist-get o :pad-url) - (format "Open pad" (plist-get o :pad-url)) - "") - "" (format "Open chat" (plist-get o :webchat-url)) - "" - "" (format-time-string "%-l:%M" (plist-get o :start-time) emacsconf-timezone) "" (or (plist-get o :slug) "") "" (or (plist-get o :title) "") "
")))) - emacsconf-tracks))) + (with-temp-buffer + (svg-print (emacsconf-schedule-svg 800 300 info)) + (buffer-string)) + "

" + (plist-get track :name) + "

" + "" + (emacsconf-publish-format-res-talks + (emacsconf-prepare-for-display + (emacsconf-filter-talks-by-time + (format "2022-12-03T08:00:00%s" emacsconf-timezone-offset) + (format "2022-12-03T18:00:00%s" emacsconf-timezone-offset) + track-talks))) + "" + (emacsconf-publish-format-res-talks + (emacsconf-prepare-for-display + (emacsconf-filter-talks-by-time + (format "2022-12-04T08:00:00%s" emacsconf-timezone-offset) + (format "2022-12-04T18:00:00%s" emacsconf-timezone-offset) + track-talks))) + "
Saturday
Sunday
"))) + (with-temp-file (expand-file-name (format "index-%s.html" (plist-get track :id)) emacsconf-res-dir) + (insert result)) + (with-temp-file (expand-file-name (format "index-%s.html" (plist-get track :id)) emacsconf-backstage-dir) + (insert result)))) + emacsconf-tracks))) (defun emacsconf-index-card-video (video-id video-file talk extensions &optional backstage) (let* ((video-base (and video-file (file-name-base video-file))) @@ -875,15 +898,6 @@ Entries are sorted chronologically, with different tracks interleaved." (defun emacsconf-sum (field talks) (apply '+ (seq-map (lambda (talk) (string-to-number (or (plist-get talk field) "0"))) talks))) -(defun emacsconf-publish-backstage-add-to-todo-hook () - (interactive) - (with-current-buffer (find-file-noselect emacsconf-org-file) - (add-hook 'org-after-todo-state-change-hook #'emacsconf-publish-backstage-org-after-todo-state-change nil t))) -(defun emacsconf-publish-backstage-remove-from-todo-hook () - (interactive) - (with-current-buffer (find-file-noselect emacsconf-org-file) - (remove-hook 'org-after-todo-state-change-hook #'emacsconf-publish-backstage-org-after-todo-state-change t))) - (defun emacsconf-publish-backstage-org-on-state-change (talk) (save-window-excursion (emacsconf-with-talk-heading talk @@ -906,7 +920,7 @@ Entries are sorted chronologically, with different tracks interleaved." (insert "" "

Schedule by status: (gray: waiting, light yellow: processing, yellow: to assign, light green: captioning, green: captioned and ready)
Updated by conf.org and the wiki repository
" - "

" + "

" (format "

Waiting for %d talks (~%d minutes) out of %d total

" (length (assoc-default "WAITING_FOR_PREREC" by-status)) (emacsconf-sum :time (assoc-default "WAITING_FOR_PREREC" by-status)) -- cgit v1.2.3