summaryrefslogtreecommitdiffstats
path: root/2020/submissions.org
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2020-11-10 13:34:03 -0500
committerSacha Chua <sacha@sachachua.com>2020-11-10 13:34:03 -0500
commitfc01255025f3270df0f275055b3c18b1cb2d00f0 (patch)
tree5e1596af00a00e702c6619aeaf2e982afbedd39c /2020/submissions.org
parentae5c1f030b9c43a3ebae981bc2295bcabae5fc10 (diff)
downloademacsconf-wiki-fc01255025f3270df0f275055b3c18b1cb2d00f0.tar.xz
emacsconf-wiki-fc01255025f3270df0f275055b3c18b1cb2d00f0.zip
Let's try it with individual info pages that are included
Diffstat (limited to '2020/submissions.org')
-rw-r--r--2020/submissions.org32
1 files changed, 24 insertions, 8 deletions
diff --git a/2020/submissions.org b/2020/submissions.org
index 94b7c775..ebb17946 100644
--- a/2020/submissions.org
+++ b/2020/submissions.org
@@ -20,8 +20,7 @@ You can check out the Org Mode source for this page by following the [[https://e
- [[elisp:conf/generate-schedule-files][Generate schedule files]]
To update the information included in the individual talk page,
-execute the buffer, update the talk's "Talk information" heading, and
-then generate schedule files.
+execute the buffer, update the talk's info/TALKID.md file.
* Tables
@@ -3115,6 +3114,8 @@ The total is written to the MIN_TIME_SUM property of this heading"
** Generate schedule file
#+begin_src emacs-lisp :results none :eval yes :exports code :tangle "conf.el"
+(defvar conf/timezones '("EST" "America/Los_Angeles" "UTC" "CET" "Asia/Singapore") "List of timezones")
+
(defun conf/get-talk-info ()
(let (talk results)
(org-map-entries (lambda ()
@@ -3177,8 +3178,24 @@ The total is written to the MIN_TIME_SUM property of this heading"
(format "<tr><td width=100>%s</td><td width=100>%s</td><td>%s</td><td>%s</td></tr>"
start end (conf/format-talk-link o) speakers)))) (cdr info) "\n")))
+(defun conf/filter-talks (info)
+ (seq-filter (lambda (o) (eq (plist-get o :type) 'talk)) info))
+
+(defun conf/split-out-talk-information ()
+ (interactive)
+ (let ((talks (conf/filter-talks (conf/get-talk-info-from-file))))
+ (mapc (lambda (o)
+ (with-temp-buffer
+ (insert
+ (format "# %s\n%s\n\n%s")
+ (plist-get o :title)
+ (plist-get o :speakers)
+ (plist-get o :info))
+ (write-file (expand-file-name (format "%s.md" (plist-get o :talk-id)) "info"))))
+ talks)))
+
(defun conf/format-talk-pages (info)
- (let* ((talks (seq-filter (lambda (o) (eq (plist-get o :type) 'talk)) info))
+ (let* ((talks (conf/filter-talks info))
(next-talks (cdr talks))
(prev-talks (cons nil talks)))
(mapc (lambda (o)
@@ -3193,8 +3210,9 @@ The total is written to the MIN_TIME_SUM property of this heading"
[[%s copyright=\"Copyright &copy; 2020 %s\"]]
%s
+%s
-# %s\n%s \n%s\n\n%s\n\n
+[[!inline pages=\"../info/%s\" raw=\"yes\"]]
%s
@@ -3208,7 +3226,6 @@ conference for instructions on how to watch and participate. See you then!
"!meta"
(plist-get o :speakers)
nav-links
- (plist-get o :title)
(concat (format-time-string "%A, %b %e %Y, " (org-timestamp-to-time (org-timestamp-split-range timestamp)))
(mapconcat
(lambda (tz)
@@ -3217,10 +3234,9 @@ conference for instructions on how to watch and participate. See you then!
(org-timestamp-to-time (org-timestamp-split-range timestamp)) tz)
(format-time-string "%l:%M %p %Z"
(org-timestamp-to-time (org-timestamp-split-range timestamp t)) tz)))
- '("EST" "America/Los_Angeles" "UTC" "CET" "Asia/Singapore")
+ conf/timezones
" / "))
- (plist-get o :speakers)
- (plist-get o :info)
+ (plist-get o :talk-id)
nav-links)))
(write-file (format "schedule/%s.md" (plist-get o :talk-id)))))
talks)))