summaryrefslogtreecommitdiffstats
path: root/emacsconf-publish.el
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2023-09-26 12:59:10 -0400
committerSacha Chua <sacha@sachachua.com>2023-09-26 12:59:10 -0400
commit1e7f47df29053c2a197ee4a143f6ea198167b4fc (patch)
tree642f8daf5d39978ed0456b85327ed9338104b586 /emacsconf-publish.el
parent79a4998759f552f6fd2872f57860ff59cc9d6c07 (diff)
downloademacsconf-el-1e7f47df29053c2a197ee4a143f6ea198167b4fc.tar.xz
emacsconf-el-1e7f47df29053c2a197ee4a143f6ea198167b4fc.zip
Recognize multiple time constraints
Diffstat (limited to 'emacsconf-publish.el')
-rw-r--r--emacsconf-publish.el87
1 files changed, 44 insertions, 43 deletions
diff --git a/emacsconf-publish.el b/emacsconf-publish.el
index 3657012..a8f2495 100644
--- a/emacsconf-publish.el
+++ b/emacsconf-publish.el
@@ -492,49 +492,50 @@ resources."
(timestamp (org-timestamp-from-string (plist-get o :scheduled))))
(emacsconf-replace-plist-in-string
(append o
- (list :format
- (concat (or (plist-get o :video-time)
- (plist-get o :time))
- "-min talk"
- (if (plist-get o :q-and-a)
- (format " followed by %s Q&A%s"
- (plist-get o :q-and-a)
- (if (eq emacsconf-publishing-phase 'conference)
- (format " (%s)"
- (if (string-match "live" (plist-get o :q-and-a))
- (if (eq 'after (emacsconf-bbb-status o))
- "done"
- (format "<https://emacsconf.org/current/%s/room>" (plist-get o :slug)))
- (emacsconf-publish-webchat-link o)))
- ""))
- ""))
- :pad-info
- (if emacsconf-publish-include-pads
- (format "Etherpad: <https://pad.emacsconf.org/%s-%s> \n" emacsconf-year (plist-get o :slug))
- "")
- :irc-info
- (format "Discuss on IRC: [#%s](%s) \n" (plist-get o :channel)
- (plist-get o :webchat-url))
- :status-info
- (if (member emacsconf-publishing-phase '(cfp program schedule conference)) (format "Status: %s \n" (plist-get o :status-label)) "")
- :schedule-info
- (if (and (member emacsconf-publishing-phase '(schedule conference))
- (not (emacsconf-talk-all-done-p o))
- (not (string= (plist-get o :status) "CANCELLED")))
- (let ((start (org-timestamp-to-time (org-timestamp-split-range timestamp)))
- (end (org-timestamp-to-time (org-timestamp-split-range timestamp t))))
- (format
- "<div>Times in different timezones:</div><div class=\"times\" start=\"%s\" end=\"%s\"><div class=\"conf-time\">%s</div><div class=\"others\"><div>which is the same as:</div>%s</div></div><div><a href=\"/%s/watch/%s/\">Find out how to watch and participate</a></div>"
- (format-time-string "%Y-%m-%dT%H:%M:%SZ" start t)
- (format-time-string "%Y-%m-%dT%H:%M:%SZ" end t)
- (emacsconf-timezone-string o emacsconf-timezone)
- (string-join (emacsconf-timezone-strings
- o
- (seq-remove (lambda (zone) (string= emacsconf-timezone zone))
- emacsconf-timezones)) "<br />")
- emacsconf-year
- (plist-get (emacsconf-get-track (plist-get o :track)) :id)))
- "")))
+ (list
+ :format
+ (concat (or (plist-get o :video-time)
+ (plist-get o :time))
+ "-min talk"
+ (if (plist-get o :q-and-a)
+ (format " followed by %s Q&A%s"
+ (plist-get o :q-and-a)
+ (if (eq emacsconf-publishing-phase 'conference)
+ (format " (%s)"
+ (if (string-match "live" (plist-get o :q-and-a))
+ (if (eq 'after (emacsconf-bbb-status o))
+ "done"
+ (format "<https://emacsconf.org/current/%s/room>" (plist-get o :slug)))
+ (emacsconf-publish-webchat-link o)))
+ ""))
+ ""))
+ :pad-info
+ (if emacsconf-publish-include-pads
+ (format "Etherpad: <https://pad.emacsconf.org/%s-%s> \n" emacsconf-year (plist-get o :slug))
+ "")
+ :irc-info
+ (format "Discuss on IRC: [#%s](%s) \n" (plist-get o :channel)
+ (plist-get o :webchat-url))
+ :status-info
+ (if (member emacsconf-publishing-phase '(cfp program schedule conference)) (format "Status: %s \n" (plist-get o :status-label)) "")
+ :schedule-info
+ (if (and (member emacsconf-publishing-phase '(schedule conference))
+ (not (emacsconf-talk-all-done-p o))
+ (not (string= (plist-get o :status) "CANCELLED")))
+ (let ((start (org-timestamp-to-time (org-timestamp-split-range timestamp)))
+ (end (org-timestamp-to-time (org-timestamp-split-range timestamp t))))
+ (format
+ "<div>Times in different timezones:</div><div class=\"times\" start=\"%s\" end=\"%s\"><div class=\"conf-time\">%s</div><div class=\"others\"><div>which is the same as:</div>%s</div></div><div><a href=\"/%s/watch/%s/\">Find out how to watch and participate</a></div>"
+ (format-time-string "%Y-%m-%dT%H:%M:%SZ" start t)
+ (format-time-string "%Y-%m-%dT%H:%M:%SZ" end t)
+ (emacsconf-timezone-string o emacsconf-timezone)
+ (string-join (emacsconf-timezone-strings
+ o
+ (seq-remove (lambda (zone) (string= emacsconf-timezone zone))
+ emacsconf-timezones)) "<br />")
+ emacsconf-year
+ (plist-get (emacsconf-get-track (plist-get o :track)) :id)))
+ "")))
(concat
"[[!toc ]]
Format: ${format}