diff options
Diffstat (limited to '2020')
-rw-r--r-- | 2020/submissions.org | 31 |
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: |