From defbc38cdc86058aa14bb417acdec616103af63f Mon Sep 17 00:00:00 2001 From: Sacha Chua Date: Sat, 12 Dec 2020 01:32:56 -0500 Subject: Tweak pad template --- 2020/organizers-notebook.md | 129 ++++++++++++------ 2020/organizers-notebook.org | 317 ++++++++++++++++++++++++------------------- 2 files changed, 264 insertions(+), 182 deletions(-) diff --git a/2020/organizers-notebook.md b/2020/organizers-notebook.md index 94a8e8d5..16d45bd1 100644 --- a/2020/organizers-notebook.md +++ b/2020/organizers-notebook.md @@ -76,6 +76,7 @@ organizers-notebook.org back to the repo. Note that re-evaluating a defvar won't change the value, so if you want to change the value after this is already loaded, use `(setq ...)`. + (defvar conf/year 2020 "Year of conference.") (defvar conf/buffer-minutes 3 "Number of minutes to use as a buffer between talks.") (defvar conf/timezones '("EST" "America/Los_Angeles" "UTC" "CET" "Asia/Singapore") "List of timezones") (defvar conf/autogenerate-talk-pages nil "Set this to t at the beginning of the conference, when we're still autogenerating individual talk pages. @@ -272,7 +273,8 @@ STREAM - main organizer, CHECK - secondary organizer or volunteer, PAD - organiz (defun conf/format-talk-link (talk) (and talk (if (plist-get talk :talk-id) - (format "%s" + (format "%s" + year (plist-get talk :talk-id) (plist-get talk :title)) (plist-get talk :title)))) @@ -334,24 +336,26 @@ STREAM - main organizer, CHECK - secondary organizer or volunteer, PAD - organiz (if prev-talk (format "Previous: %s \n" prev-talk) "") (if next-talk (format "Next: %s \n" next-talk) "")))) (insert (format "[[%s title=\"%s\"]] - [[%s copyright=\"Copyright © 2020 %s\"]] + [[%s copyright=\"Copyright © %s %s\"]] - \n + \n - %s + %s - [[!inline pages=\"internal(2020/info/%s)\" raw=\"yes\"]] + [[!inline pages=\"internal(%s/info/%s)\" raw=\"yes\"]] - %s + %s - %s + %s - " + " "!meta" (replace-regexp-in-string "\"" "\\\\\"" (plist-get o :title)) - "!meta" + "!meta" + conf/year (plist-get o :speakers) nav-links + conf/year (plist-get o :talk-id) schedule nav-links))) @@ -359,40 +363,77 @@ STREAM - main organizer, CHECK - secondary organizer or volunteer, PAD - organiz talks))) (defun conf/generate-pad-template () - (interactive) - (let ((talks (conf/filter-talks conf/info))) - (with-current-buffer (find-file "pad-template.md") + "Generate a template for copying and pasting into the pad. + Writes it to pad-template.html." + (interactive "p") + (let* ((talks (conf/filter-talks conf/info)) + (text (concat + "

Conference info, how to watch/participate: https://emacsconf.org/2020/
+ Guidelines for conduct: https://emacsconf.org/conduct/

+ +

Except where otherwise noted, the material on the EmacsConf pad are dual-licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International Public License; and the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) an later version. + Copies of these two licenses are included in the EmacsConf wiki repository, in the COPYING.GPL and COPYING.CC-BY-SA files (https://emacsconf.org/COPYING/).

+ +

By contributing to this pad, you agree to make your contributions available under the above licenses. You are also promising that you are the author of your changes, or that you copied them from a work in the public domain or a work released under a free license that is compatible with the above two licenses. DO NOT SUBMIT COPYRIGHTED WORK WITHOUT PERMISSION.

+ +

+ This pad is here to be curated by everybody and its rough structure is like this: +

  1. General info and license +
  2. A section for each talk -> please do add questions and notes +
  3. A general feedback section +
+

+ " + (mapconcat + (lambda (o) + (let ((url (format "https://emacsconf.org/%s/schedule/%s" conf/year (plist-get o :talk-id)))) + (format "-------------------------------------------------------------------------------------------------
Talk%s: %s
+ Speaker(s): %s
+ Talk page: %s
+ Actual start of talk EST:     Start of Q&A:    End of Q&A:   
+ Questions: + Speakers may answer in any order or skip questions. As much as possible, put your questions at the top level instead of under another question. If adding an answer, please indicate [speaker] or your nick accordingly. Volunteers, please add new slots as ones get filled.
+ + + Links and other notes: + + " (plist-get o :talk-id) (plist-get o :title) (plist-get o :speakers) url url))) talks "

\n") + "

-------------------------------------------------------------------------------------------------
+ General Feedback: What went well?

+ +

+ -------------------------------------------------------------------------------------------------
+ General Feedback: What to improve?

+ +

+ -------------------------------------------------------------------------------------------------
+ Colophon: + "))) + (with-current-buffer (find-file "pad-template.html") (erase-buffer) - (insert - (concat - "Conference info, how to watch/participate: - Code of conduct: - - " - (mapconcat - (lambda (o) - (format "**%s** - Speaker(s): %s - Talk page: - - *Questions:* - - * Put your questions here, most recent on top - * sample text - - *Links:* - - * sample text - * sample text - - *Other notes:* - - * sample text - * sample text -
-
- " (plist-get o :title) (plist-get o :speakers) (plist-get o :talk-id))) talks " \n \n"))) - (save-buffer)))) + (insert text) + (save-buffer))) + (browse-url-of-file "pad-template.html")) (defun conf/generate-talks-page () (let ((info conf/info)) @@ -706,10 +747,10 @@ Another collaborative pad ### Encode highly-compressed versions -[Compressing video](#org9a70982) +[Compressing video](#orgbdc605d) - + ### Compressing video diff --git a/2020/organizers-notebook.org b/2020/organizers-notebook.org index 7bff5d4f..a3c81224 100644 --- a/2020/organizers-notebook.org +++ b/2020/organizers-notebook.org @@ -76,6 +76,7 @@ organizers-notebook.org back to the repo. Note that re-evaluating a defvar won't change the value, so if you want to change the value after this is already loaded, use =(setq ...)=. #+begin_src emacs-lisp +(defvar conf/year 2020 "Year of conference.") (defvar conf/buffer-minutes 3 "Number of minutes to use as a buffer between talks.") (defvar conf/timezones '("EST" "America/Los_Angeles" "UTC" "CET" "Asia/Singapore") "List of timezones") (defvar conf/autogenerate-talk-pages nil "Set this to t at the beginning of the conference, when we're still autogenerating individual talk pages. @@ -270,155 +271,195 @@ 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" - (defun conf/format-talk-link (talk) - (and talk (if (plist-get talk :talk-id) - (format "%s" - (plist-get talk :talk-id) - (plist-get talk :title)) - (plist-get talk :title)))) - - (defun conf/format-talk-info-as-schedule (info) - (format "%s
" - (mapconcat - (lambda (o) - (let* ((time-fmt "%l:%M %p") - (timestamp (org-timestamp-from-string (plist-get o :scheduled))) - (start (if timestamp (format-time-string time-fmt (org-timestamp-to-time (org-timestamp-split-range timestamp))) "")) - (end (if timestamp (format-time-string time-fmt (org-timestamp-to-time (org-timestamp-split-range timestamp t))) "")) - (title (plist-get o :title)) - (speakers (plist-get o :speakers))) - (if (eq (plist-get o :type) 'headline) - (format "%s" - (if (plist-get o :talk-id) - (conf/format-talk-link o) - title)) - (format "~%s~%s%s%s" - start end (conf/format-talk-link o) speakers)))) - (cdr info) "\n"))) - - (defun conf/filter-talks (info) - (seq-filter (lambda (o) (plist-get o :talk-id)) info)) - - (defun conf/split-out-talk-information () - (interactive) - (let ((talks (conf/filter-talks conf/info))) - (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 (conf/filter-talks 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))) - (schedule (mapconcat - (lambda (tz) - (format "%s - %s" - (format-time-string "%A, %b %e %Y, ~%l:%M %p" - (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))) - conf/timezones - " \n")) - (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 "[[%s title=\"%s\"]] - [[%s copyright=\"Copyright © 2020 %s\"]] - - \n + (defun conf/format-talk-link (talk) + (and talk (if (plist-get talk :talk-id) + (format "%s" + year + (plist-get talk :talk-id) + (plist-get talk :title)) + (plist-get talk :title)))) + + (defun conf/format-talk-info-as-schedule (info) + (format "%s
" + (mapconcat + (lambda (o) + (let* ((time-fmt "%l:%M %p") + (timestamp (org-timestamp-from-string (plist-get o :scheduled))) + (start (if timestamp (format-time-string time-fmt (org-timestamp-to-time (org-timestamp-split-range timestamp))) "")) + (end (if timestamp (format-time-string time-fmt (org-timestamp-to-time (org-timestamp-split-range timestamp t))) "")) + (title (plist-get o :title)) + (speakers (plist-get o :speakers))) + (if (eq (plist-get o :type) 'headline) + (format "%s" + (if (plist-get o :talk-id) + (conf/format-talk-link o) + title)) + (format "~%s~%s%s%s" + start end (conf/format-talk-link o) speakers)))) + (cdr info) "\n"))) + + (defun conf/filter-talks (info) + (seq-filter (lambda (o) (plist-get o :talk-id)) info)) + + (defun conf/split-out-talk-information () + (interactive) + (let ((talks (conf/filter-talks conf/info))) + (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 (conf/filter-talks 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))) + (schedule (mapconcat + (lambda (tz) + (format "%s - %s" + (format-time-string "%A, %b %e %Y, ~%l:%M %p" + (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))) + conf/timezones + " \n")) + (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 "[[%s title=\"%s\"]] + [[%s copyright=\"Copyright © %s %s\"]] + + \n %s - [[!inline pages=\"internal(2020/info/%s)\" raw=\"yes\"]] + [[!inline pages=\"internal(%s/info/%s)\" raw=\"yes\"]] %s %s " - "!meta" - (replace-regexp-in-string "\"" "\\\\\"" (plist-get o :title)) - "!meta" - (plist-get o :speakers) - nav-links - (plist-get o :talk-id) - schedule - nav-links))) - (write-file (format "talks/%s.md" (plist-get o :talk-id))))) - talks))) - - (defun conf/generate-pad-template () - (interactive) - (let ((talks (conf/filter-talks conf/info))) - (with-current-buffer (find-file "pad-template.md") - (erase-buffer) - (insert - (concat - "Conference info, how to watch/participate: - Code of conduct: - + "!meta" + (replace-regexp-in-string "\"" "\\\\\"" (plist-get o :title)) + "!meta" + conf/year + (plist-get o :speakers) + nav-links + conf/year + (plist-get o :talk-id) + schedule + nav-links))) + (write-file (format "talks/%s.md" (plist-get o :talk-id))))) + talks))) + + (defun conf/generate-pad-template () + "Generate a template for copying and pasting into the pad. + Writes it to pad-template.html." + (interactive "p") + (let* ((talks (conf/filter-talks conf/info)) + (text (concat + "

Conference info, how to watch/participate: https://emacsconf.org/2020/
+ Guidelines for conduct: https://emacsconf.org/conduct/

+ +

Except where otherwise noted, the material on the EmacsConf pad are dual-licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International Public License; and the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) an later version. + Copies of these two licenses are included in the EmacsConf wiki repository, in the COPYING.GPL and COPYING.CC-BY-SA files (https://emacsconf.org/COPYING/).

+ +

By contributing to this pad, you agree to make your contributions available under the above licenses. You are also promising that you are the author of your changes, or that you copied them from a work in the public domain or a work released under a free license that is compatible with the above two licenses. DO NOT SUBMIT COPYRIGHTED WORK WITHOUT PERMISSION.

+ +

+ This pad is here to be curated by everybody and its rough structure is like this: +

  1. General info and license +
  2. A section for each talk -> please do add questions and notes +
  3. A general feedback section +
+

" - (mapconcat - (lambda (o) - (format "**%s** - Speaker(s): %s - Talk page: - - ,*Questions:* - - ,* Put your questions here, most recent on top - ,* sample text - - ,*Links:* - - ,* sample text - ,* sample text - - ,*Other notes:* - - ,* sample text - ,* sample text -
-
- " (plist-get o :title) (plist-get o :speakers) (plist-get o :talk-id))) talks " \n \n"))) - (save-buffer)))) - - (defun conf/generate-talks-page () - (let ((info conf/info)) - (with-temp-buffer - (find-file "talk-details.md") - (erase-buffer) - (insert (format "%s
DurationTitleSpeakers
" - (mapconcat - (lambda (o) - (let* ((title (plist-get o :title)) - (speakers (plist-get o :speakers))) - (if (null (plist-get o :talk-id)) - (format "%s" (conf/format-talk-link o)) - (format "%s%s%s" - (plist-get o :duration) - (conf/format-talk-link o) - (plist-get o :speakers))))) - info "\n"))) - (save-buffer)))) - - (defun conf/generate-schedule-files (&optional filename) - (interactive) + (mapconcat + (lambda (o) + (let ((url (format "https://emacsconf.org/%s/schedule/%s" conf/year (plist-get o :talk-id)))) + (format "-------------------------------------------------------------------------------------------------
Talk%s: %s
+ Speaker(s): %s
+ Talk page: %s
+ Actual start of talk EST:     Start of Q&A:    End of Q&A:   
+ Questions: + Speakers may answer in any order or skip questions. As much as possible, put your questions at the top level instead of under another question. If adding an answer, please indicate [speaker] or your nick accordingly. Volunteers, please add new slots as ones get filled.
+
    +
  • Q1: 
    • A: 
  • +
  • Q2: 
    • A: 
  • +
  • Q3: 
    • A: 
  • +
  • Q4: 
    • A: 
  • +
+ + Links and other notes: +
    +
  • sample text
  • +
  • sample text
  • +
  • sample text
  • +
  • sample text
  • +
+ " (plist-get o :talk-id) (plist-get o :title) (plist-get o :speakers) url url))) talks "

\n") + "

-------------------------------------------------------------------------------------------------
+ General Feedback: What went well?

+
    +
  • sample text
  • +
  • sample text
  • +
  • sample text
  • +
  • sample text
  • +
+

+ -------------------------------------------------------------------------------------------------
+ General Feedback: What to improve?

+
    +
  • sample text
  • +
  • sample text
  • +
  • sample text
  • +
  • sample text
  • +
+

+ -------------------------------------------------------------------------------------------------
+ Colophon: +
    "))) + (with-current-buffer (find-file "pad-template.html") + (erase-buffer) + (insert text) + (save-buffer))) + (browse-url-of-file "pad-template.html")) + + (defun conf/generate-talks-page () + (let ((info conf/info)) (with-temp-buffer - (insert (conf/format-talk-info-as-schedule conf/info)) - (write-file "schedule-details.md")) - (when conf/autogenerate-talk-pages (conf/format-talk-pages conf/info))) + (find-file "talk-details.md") + (erase-buffer) + (insert (format "%s
    DurationTitleSpeakers
    " + (mapconcat + (lambda (o) + (let* ((title (plist-get o :title)) + (speakers (plist-get o :speakers))) + (if (null (plist-get o :talk-id)) + (format "%s" (conf/format-talk-link o)) + (format "%s%s%s" + (plist-get o :duration) + (conf/format-talk-link o) + (plist-get o :speakers))))) + info "\n"))) + (save-buffer)))) + + (defun conf/generate-schedule-files (&optional filename) + (interactive) + (with-temp-buffer + (insert (conf/format-talk-info-as-schedule conf/info)) + (write-file "schedule-details.md")) + (when conf/autogenerate-talk-pages (conf/format-talk-pages conf/info))) #+end_src Set the info based on submissions.org. -- cgit v1.2.3