From 1b389e01ce4db896a1882858131207845a890460 Mon Sep 17 00:00:00 2001 From: Sacha Chua Date: Fri, 23 Oct 2020 00:52:23 -0400 Subject: Copyright and nav links --- 2020/submissions.org | 69 ++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 48 insertions(+), 21 deletions(-) (limited to '2020/submissions.org') diff --git a/2020/submissions.org b/2020/submissions.org index 5aa5a7e5..0aa8826e 100644 --- a/2020/submissions.org +++ b/2020/submissions.org @@ -2928,7 +2928,7 @@ SCHEDULED: <2020-11-29 Sun 16:30-17:00> :CUSTOM_ID: talk37 :TALK_ID: 37 :END: - +** Planning #+NAME: check_time #+begin_src emacs-lisp :export code :eval no (list (list "Difference" "Minimum time" "Target time") @@ -3064,6 +3064,11 @@ The total is written to the MIN_TIME_SUM property of this heading" (when talk (setq results (cons talk results))) (reverse results))) +(defun conf/format-talk-link (talk) + (and talk (format "%s" + (plist-get talk :talk-id) + (plist-get talk :title)))) + (defun conf/format-talk-info-as-schedule (info) (format "%s
" (mapconcat @@ -3077,27 +3082,47 @@ The total is written to the MIN_TIME_SUM property of this heading" (if (eq (plist-get o :type) 'headline) (format "%s" title) - (format "%s%s%s%s" - start end (plist-get o :talk-id) title speakers)))) (cdr info) "\n"))) + (format "%s%s%s%s" + start end (conf/format-talk-link o) speakers)))) (cdr info) "\n"))) + (defun conf/format-talk-pages (info) - (mapc (lambda (o) - (with-temp-buffer - (let ((timestamp (org-timestamp-from-string (plist-get o :scheduled)))) - (insert (format "# %s\n%s \n%s\n\n%s\n\n -Back to the [[schedule]] - -All times are approximate, and we might shuffle talks around as needed. Please check https://emacsconf.org/2020 a few days before the start of the conference for instructions on how to watch and participate. -\n[[!meta title=\"%s\"]]" - (plist-get o :title) - (format "%s - %s" - (format-time-string "%A, %b %e %Y, %l:%M %p" (org-timestamp-to-time (org-timestamp-split-range timestamp))) - (format-time-string "%l:%M %p" (org-timestamp-to-time (org-timestamp-split-range timestamp t)))) - (plist-get o :speakers) - (org-export-string-as (plist-get o :abstract) 'md t) - (replace-regexp-in-string "\"" "\\\\\"" (plist-get o :title)) - ))) - (write-file (format "schedule/%s.md" (plist-get o :talk-id))))) - (seq-filter (lambda (o) (eq (plist-get o :type) 'talk)) info))) + (let* ((talks (seq-filter (lambda (o) (eq (plist-get o :type) 'talk)) info)) + (next-talks (cdr talks)) + (prev-talks (cons nil talks))) + (mapc (lambda (o) + (with-temp-buffer + (let* ((timestamp (org-timestamp-from-string (plist-get o :scheduled))) + (next-talk (conf/format-talk-link (pop next-talks))) + (prev-talk (conf/format-talk-link (pop prev-talks))) + (nav-links (format "Back to the [[schedule]] \n%s%s" + (if prev-talk (format "Previous: %s \n" prev-talk) "") + (if next-talk (format "Next: %s \n" next-talk) "")))) + (insert (format "[[!meta title=\"%s\"]] +[[!meta copyright=\"Copyright © 2020 %s\"]] + +%s + +# %s\n%s \n%s\n\n%s\n\n + +%s + +All times are approximate, and we might shuffle talks around as needed. +Please check a few days before the start of the +conference for instructions on how to watch and participate. See you then! +\n +" + (replace-regexp-in-string "\"" "\\\\\"" (plist-get o :title)) + (plist-get o :speakers) + nav-links + (plist-get o :title) + (format "%s - %s" + (format-time-string "%A, %b %e %Y, %l:%M %p" (org-timestamp-to-time (org-timestamp-split-range timestamp))) + (format-time-string "%l:%M %p" (org-timestamp-to-time (org-timestamp-split-range timestamp t)))) + (plist-get o :speakers) + (org-export-string-as (plist-get o :abstract) 'md t) + nav-links))) + (write-file (format "schedule/%s.md" (plist-get o :talk-id))))) + talks))) (defun conf/generate-schedule-files () (interactive) @@ -3116,6 +3141,8 @@ All times are approximate, and we might shuffle talks around as needed. Please c (org-export-to-file 'md "schedule.md"))))) #+end_src +#+RESULTS: + * COMMENT Possible rough flow suggested by Sacha #+begin_src emacs-lisp :exports both -- cgit v1.2.3