summaryrefslogtreecommitdiffstats
path: root/2020
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2020-10-26 00:09:32 -0400
committerSacha Chua <sacha@sachachua.com>2020-10-26 00:09:32 -0400
commitd9a43b36dc0d2ea66f3ae4a4643e56a6a87555d8 (patch)
tree4f7aa682e2cf123428979110d5fa0345ccb69c2f /2020
parent281ceb1a251adaa9f4f0982aab06095cb62f0ad7 (diff)
downloademacsconf-wiki-d9a43b36dc0d2ea66f3ae4a4643e56a6a87555d8.tar.xz
emacsconf-wiki-d9a43b36dc0d2ea66f3ae4a4643e56a6a87555d8.zip
Add more code for talk info
Diffstat (limited to '2020')
-rw-r--r--2020/submissions.org31
1 files changed, 20 insertions, 11 deletions
diff --git a/2020/submissions.org b/2020/submissions.org
index 90d82dce..3b25c486 100644
--- a/2020/submissions.org
+++ b/2020/submissions.org
@@ -2939,7 +2939,7 @@ SCHEDULED: <2020-11-29 Sun 16:30-17:00>
(org-entry-get (point) "TARGET_TIME")))
#+end_src
-#+begin_src emacs-lisp :results none
+#+begin_src emacs-lisp :results none :tangle "conf.el"
(defun conf/assign-ids ()
(interactive)
(goto-char (point-min))
@@ -3064,6 +3064,12 @@ The total is written to the MIN_TIME_SUM property of this heading"
(when talk (setq results (cons talk results)))
(reverse results)))
+(defun conf/filter-talks (list)
+ "Return only talk info in LIST."
+ (seq-filter
+ (lambda (talk) (eq (plist-get talk :type) 'talk))
+ list))
+
(defun conf/format-talk-link (talk)
(and talk (format "<a href=\"/2020/schedule/%s\">%s</a>"
(plist-get talk :talk-id)
@@ -3124,21 +3130,24 @@ conference for instructions on how to watch and participate. See you then!
(write-file (format "schedule/%s.md" (plist-get o :talk-id)))))
talks)))
-(defun conf/generate-schedule-files ()
- (interactive)
+(defun conf/get-talk-info-from-file (&optional filename)
(with-temp-buffer
- (insert-file-contents "submissions.org")
+ (insert-file-contents (or filename "submissions.org"))
(org-mode)
(org-show-all)
(goto-char (point-min))
(goto-char (org-find-property "ID" "talks"))
- (let ((info (conf/get-talk-info)))
- (with-temp-buffer
- (insert (conf/format-talk-info-as-schedule info))
- (write-file "schedule-details.txt"))
- (conf/format-talk-pages info)
- (with-current-buffer (find-file "schedule.org")
- (org-export-to-file 'md "schedule.md")))))
+ (conf/get-talk-info)))
+
+(defun conf/generate-schedule-files (&optional filename)
+ (interactive)
+ (let ((info (conf/get-talk-info-from-file filename)))
+ (with-temp-buffer
+ (insert (conf/format-talk-info-as-schedule info))
+ (write-file "schedule-details.txt"))
+ (conf/format-talk-pages info)
+ (with-current-buffer (find-file "schedule.org")
+ (org-export-to-file 'md "schedule.md"))))
#+end_src
#+RESULTS: