summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2023-10-02 08:31:09 -0400
committerSacha Chua <sacha@sachachua.com>2023-10-02 08:31:09 -0400
commiteb47ad145dc5b73d91cc0a629dfc7baf724e2403 (patch)
treefcd22d7d098c232c1e44c43716f58d764ea73f02
parentd2fe9a1a2caca2b964afe20898627326a29cd6f4 (diff)
downloademacsconf-el-eb47ad145dc5b73d91cc0a629dfc7baf724e2403.tar.xz
emacsconf-el-eb47ad145dc5b73d91cc0a629dfc7baf724e2403.zip
draft schedule
-rw-r--r--emacsconf-publish.el180
-rw-r--r--emacsconf-schedule.el7
-rw-r--r--emacsconf.el14
3 files changed, 107 insertions, 94 deletions
diff --git a/emacsconf-publish.el b/emacsconf-publish.el
index a8f2495..4fac960 100644
--- a/emacsconf-publish.el
+++ b/emacsconf-publish.el
@@ -366,13 +366,13 @@
info
"<div class=\"files resources\"><ul>${other-files}${toobnix-info}</ul></div>"))))
-(defun emacsconf-format-public-email (o &optional email)
+(defun emacsconf-publish-format-public-email (o &optional email)
(format "[%s](mailto:%s?subject=%s)"
(or email (plist-get o :public-email))
(or email (plist-get o :public-email))
(url-hexify-string (format "Comment for EmacsConf 2022 %s: %s" (plist-get o :slug) (plist-get o :title)))))
-(defun emacsconf-format-speaker-info (o)
+(defun emacsconf-publish-format-speaker-info (o)
(let ((extra-info (mapconcat #'identity
(delq nil (list
(unless (string= (plist-get o :pronunciation) "nil")
@@ -400,7 +400,7 @@
(emacsconf-replace-plist-in-string
(emacsconf-convert-talk-abstract-to-markdown
(append o (list
- :speaker-info (emacsconf-format-speaker-info o)
+ :speaker-info (emacsconf-publish-format-speaker-info o)
:meta "!meta"
:categories (if (plist-get o :categories)
(mapconcat (lambda (o) (format "[[!taglink %s]]" o))
@@ -487,7 +487,8 @@ resources."
(defvar emacsconf-publish-include-pads nil "When non-nil, include Etherpad info.")
-(defun emacsconf-format-talk-schedule-info (o)
+(defun emacsconf-publish-format-talk-schedule-info (o)
+ "Format schedule information for O."
(let ((friendly (concat "/" emacsconf-year "/talks/" (plist-get o :slug) ))
(timestamp (org-timestamp-from-string (plist-get o :scheduled))))
(emacsconf-replace-plist-in-string
@@ -545,9 +546,10 @@ ${pad-info}${irc-info}${status-info}${schedule-info}\n"
"")
"\n"))))
-(defun emacsconf-format-email-questions-and-comments (talk)
+(defun emacsconf-publish-format-email-questions-and-comments (talk)
+ "Invite people to e-mail either the public contact for TALK or the private list."
(format "Questions or comments? Please e-mail %s"
- (emacsconf-format-public-email talk
+ (emacsconf-publish-format-public-email talk
(or
(and (string= (plist-get talk :public-email) "t")
(plist-get talk :email))
@@ -573,43 +575,39 @@ ${pad-info}${irc-info}${status-info}${schedule-info}\n"
(shell-command (concat "git add " (shell-quote-argument filename))))))
(seq-filter (lambda (o) (string-match "vtt$" o)) emacsconf-main-extensions))))
-(defun emacsconf-publish-format-talk-page-schedule (talk info)
+(defun emacsconf-publish-format-talk-schedule-image (talk info)
"Add the schedule image for TALK based on INFO."
(concat
- (if (member emacsconf-publishing-phase '(schedule conference))
- (concat
- "\nThe following image shows where the talk is in the schedule for "
- (format-time-string "%a %Y-%m-%d" (plist-get talk :start-time) emacsconf-timezone) ". Solid lines show talks with Q&A via BigBlueButton. Dashed lines show talks with Q&A via IRC or Etherpad."
- (format "<div class=\"schedule-in-context schedule-svg-container\" data-slug=\"%s\">\n" (plist-get talk :slug))
- (let* ((width 800) (height 150)
- (talk-date (format-time-string "%Y-%m-%d" (plist-get talk :start-time) emacsconf-timezone))
- (start (date-to-time (concat talk-date "T" emacsconf-schedule-start-time emacsconf-timezone-offset)))
- (end (date-to-time (concat talk-date "T" emacsconf-schedule-end-time emacsconf-timezone-offset)))
- svg)
- (with-temp-buffer
- (setq svg (emacsconf-schedule-svg-day
- (svg-create width height)
- (format-time-string "%A" (plist-get talk :start-time) emacsconf-timezone)
- width height
- start end
- (emacsconf-by-track
- (seq-filter (lambda (o) (string= (format-time-string "%Y-%m-%d" (plist-get o :start-time) emacsconf-timezone)
- talk-date))
- info))))
- (mapc (lambda (node)
- (let ((rect (car (dom-by-tag node 'rect))))
- (if (string= (dom-attr node 'data-slug) (plist-get talk :slug))
- (progn
- (dom-set-attribute rect 'opacity "0.8")
- (dom-set-attribute rect 'stroke-width "3")
- (dom-set-attribute (car (dom-by-tag node 'text)) 'font-weight "bold"))
- (dom-set-attribute rect 'opacity "0.5"))))
- (dom-by-tag svg 'a))
- (svg-print svg)
- (buffer-string)))
- "\n</div>\n\n")
- "")
- (emacsconf-format-talk-schedule-info talk) "\n\n"))
+ "\nThe following image shows where the talk is in the schedule for "
+ (format-time-string "%a %Y-%m-%d" (plist-get talk :start-time) emacsconf-timezone) ". Solid lines show talks with Q&A via BigBlueButton. Dashed lines show talks with Q&A via IRC or Etherpad."
+ (format "<div class=\"schedule-in-context schedule-svg-container\" data-slug=\"%s\">\n" (plist-get talk :slug))
+ (let* ((width 800) (height 150)
+ (talk-date (format-time-string "%Y-%m-%d" (plist-get talk :start-time) emacsconf-timezone))
+ (start (date-to-time (concat talk-date "T" emacsconf-schedule-start-time emacsconf-timezone-offset)))
+ (end (date-to-time (concat talk-date "T" emacsconf-schedule-end-time emacsconf-timezone-offset)))
+ svg)
+ (with-temp-buffer
+ (setq svg (emacsconf-schedule-svg-day
+ (svg-create width height)
+ (format-time-string "%A" (plist-get talk :start-time) emacsconf-timezone)
+ width height
+ start end
+ (emacsconf-by-track
+ (seq-filter (lambda (o) (string= (format-time-string "%Y-%m-%d" (plist-get o :start-time) emacsconf-timezone)
+ talk-date))
+ info))))
+ (mapc (lambda (node)
+ (let ((rect (car (dom-by-tag node 'rect))))
+ (if (string= (dom-attr node 'data-slug) (plist-get talk :slug))
+ (progn
+ (dom-set-attribute rect 'opacity "0.8")
+ (dom-set-attribute rect 'stroke-width "3")
+ (dom-set-attribute (car (dom-by-tag node 'text)) 'font-weight "bold"))
+ (dom-set-attribute rect 'opacity "0.5"))))
+ (dom-by-tag svg 'a))
+ (svg-print svg)
+ (buffer-string)))
+ "\n</div>\n\n"))
(defun emacsconf-publish-before-page (talk &optional info)
"Generate the page that has the info included before the abstract.
@@ -623,7 +621,9 @@ This includes the intro note, the schedule, and talk resources."
(insert (emacsconf-surround "" (plist-get talk :intro-note) "\n\n" ""))
(let ((is-live (emacsconf-talk-live-p talk)))
(when is-live (emacsconf-publish-captions-in-wiki talk))
- (insert (emacsconf-publish-format-talk-page-schedule talk info))
+ (when (member emacsconf-publishing-phase '(schedule conference))
+ (insert (emacsconf-publish-format-talk-schedule-image talk info)))
+ (insert (emacsconf-publish-format-talk-schedule-info talk) "\n\n")
(insert
(if (plist-get talk :public) (emacsconf-wiki-talk-resources talk) "")
"\n# Description\n"))
@@ -679,19 +679,8 @@ This includes the intro note, the schedule, and talk resources."
subtitles pars (concat video-id "-" (plist-get talk :slug))))
"")))
-(defun emacsconf-publish-after-page (talk &optional info)
- "Generate the page with info included after the abstract.
-This includes captions, contact, and an invitation to participate."
- (interactive (list (emacsconf-complete-talk-info)))
- ;; Contact information
- (with-temp-file (expand-file-name (format "%s-after.md" (plist-get talk :slug))
- (expand-file-name "info" (expand-file-name emacsconf-year emacsconf-directory)))
- (insert
- "<!-- Automatically generated by emacsconf-publish-after-page -->\n"
- "\n\n"
- ;; main transcript
- (if (plist-get talk :public)
- (let ((transcripts
+(defun emacsconf-publish-format-captions (talk)
+ (let ((transcripts
(mapconcat
(lambda (lang)
(let ((filename
@@ -718,9 +707,21 @@ This includes captions, contact, and an invitation to participate."
"\n\nCaptioner: ")
(plist-get talk :captioner)
"\n\n"))
- ""))
- "")
- (emacsconf-format-email-questions-and-comments talk) "\n"
+ "")))
+
+(defun emacsconf-publish-after-page (talk &optional info)
+ "Generate the page with info included after the abstract.
+This includes captions, contact, and an invitation to participate."
+ (interactive (list (emacsconf-complete-talk-info)))
+ ;; Contact information
+ (with-temp-file (expand-file-name (format "%s-after.md" (plist-get talk :slug))
+ (expand-file-name "info" (expand-file-name emacsconf-year emacsconf-directory)))
+ (insert
+ "<!-- Automatically generated by emacsconf-publish-after-page -->\n"
+ "\n\n"
+ ;; main transcript
+ (if (plist-get talk :public) (emacsconf-publish-format-captions talk) "")
+ (emacsconf-publish-format-email-questions-and-comments talk) "\n"
(if (eq emacsconf-publishing-phase 'cfp)
(format "\n----\nGot an idea for an EmacsConf talk or session? We'd love to hear from you! Check out the [[Call for Participation|/%s/cfp]] for details.\n" emacsconf-year)
"")
@@ -744,7 +745,7 @@ This includes captions, contact, and an invitation to participate."
(defun emacsconf-publish-nav-pages (&optional talks)
"Generate links to the next and previous talks.
During the schedule and conference phase, the talks are sorted by time.
- Otherwise, they're sorted by track and then schedule."
+Otherwise, they're sorted by track and then schedule."
(interactive (list (emacsconf-publish-prepare-for-display (or emacsconf-schedule-draft (emacsconf-get-talk-info)))))
(let* ((next-talks (cdr talks))
(prev-talks (cons nil talks))
@@ -952,38 +953,43 @@ Entries are sorted chronologically, with different tracks interleaved."
(interactive)
(emacsconf-publish-schedule-svg-snippets)
(setq info (or info (emacsconf-publish-prepare-for-display info)))
- (with-temp-file (expand-file-name "schedule-details.md" (expand-file-name emacsconf-year emacsconf-directory))
+ (with-temp-file (expand-file-name "schedule-details.md"
+ (expand-file-name emacsconf-year emacsconf-directory))
(insert
(if (member emacsconf-publishing-phase '(cfp program))
(let ((sorted (emacsconf-publish-prepare-for-display (or info (emacsconf-get-talk-info)))))
- (mapconcat (lambda (track)
- (concat
- "Jump to: "
- ;; links to other tracks
- (string-join (seq-keep (lambda (track-link)
- (unless (string= (plist-get track-link :id)
- (plist-get track :id))
- (format "<a href=\"#%s\">%s</a>"
- (plist-get track-link :id)
- (plist-get track-link :name))))
- emacsconf-tracks)
- " | ")
- "\n\n"
- (let ((track-talks (seq-filter (lambda (o) (string= (plist-get o :track)
- (plist-get track :name)))
- sorted)))
- (format
- "<h1 id=\"%s\" class=\"sched-track %s\">%s (%d talks)</h1>\n%s"
- (plist-get track :id)
- (plist-get track :name)
- (plist-get track :name)
- (length track-talks)
- (emacsconf-publish-format-main-schedule track-talks)))))
- emacsconf-tracks "\n\n"))
+ (mapconcat
+ (lambda (track)
+ (concat
+ "Jump to: "
+ ;; links to other tracks
+ (string-join (seq-keep (lambda (track-link)
+ (unless (string= (plist-get track-link :id)
+ (plist-get track :id))
+ (format "<a href=\"#%s\">%s</a>"
+ (plist-get track-link :id)
+ (plist-get track-link :name))))
+ emacsconf-tracks)
+ " | ")
+ "\n\n"
+ (let ((track-talks (seq-filter (lambda (o) (string= (plist-get o :track)
+ (plist-get track :name)))
+ sorted)))
+ (format
+ "<h1 id=\"%s\" class=\"sched-track %s\">%s (%d talks)</h1>\n%s"
+ (plist-get track :id)
+ (plist-get track :name)
+ (plist-get track :name)
+ (length track-talks)
+ (emacsconf-publish-format-main-schedule track-talks)))))
+ emacsconf-tracks "\n\n"))
(emacsconf-publish-format-interleaved-schedule info))))
(when (member emacsconf-publishing-phase '(cfp program))
- (with-temp-file (expand-file-name "draft-schedule.md" (expand-file-name emacsconf-year emacsconf-directory))
+ (with-temp-file (expand-file-name
+ "draft-schedule.md"
+ (expand-file-name emacsconf-year emacsconf-directory))
(insert
+ "[[!sidebar content=\"\"]]\n\n"
"This is a *DRAFT* schedule.\n"
(let ((emacsconf-publishing-phase 'schedule))
(emacsconf-publish-format-interleaved-schedule info))))))
@@ -1031,8 +1037,8 @@ Entries are sorted chronologically, with different tracks interleaved."
("STARTED" "now playing")
(_ nil))
:time (plist-get o :time)
- :q-and-a (plist-get o :qa-link)
- :pad (plist-get o :pad-url)
+ :q-and-a (plist-get o :qa-link)
+ :pad (and emacsconf-publish-include-pads (plist-get o :pad-url))
:startutc (format-time-string "%FT%T%z" (plist-get o :start-time) t)
:endutc (format-time-string "%FT%T%z" (plist-get o :end-time) t)
:start (format-time-string "%-l:%M" (plist-get o :start-time) emacsconf-timezone)
diff --git a/emacsconf-schedule.el b/emacsconf-schedule.el
index 885cada..34ac5f6 100644
--- a/emacsconf-schedule.el
+++ b/emacsconf-schedule.el
@@ -720,9 +720,12 @@ If emacsconf-schedule-apply is non-nil, update `emacsconf-org-file' and the wiki
(when (and (boundp 'emacsconf-schedule-apply) emacsconf-schedule-apply)
(emacsconf-schedule-update-from-info schedule))
(with-temp-file ,filename
- (svg-print (emacsconf-schedule-svg 800 200 schedule)))
+ (svg-print (emacsconf-schedule-svg 800 400 schedule)))
(clear-image-cache)
- (mapconcat (lambda (o) (format "- %s\n" o)) (append validation (list (format "[[file:%s]]" filename))))))
+ (mapconcat (lambda (o) (format "- %s\n" o))
+ validation
+ ;; (append validation (list (format "[[file:%s]]" filename)))
+ )))
(when (and (boundp 'emacsconf-schedule-apply) emacsconf-schedule-apply)
(emacsconf-publish-before-pages)
(emacsconf-publish-schedule)
diff --git a/emacsconf.el b/emacsconf.el
index 6dbb498..c4a5383 100644
--- a/emacsconf.el
+++ b/emacsconf.el
@@ -693,7 +693,8 @@ The subheading should match `emacsconf-abstract-heading-regexp'."
emacsconf-year
(plist-get o :slug)))
(plist-put o :intro-expanded (emacsconf-pad-expand-intro o))
- (let ((track (emacsconf-get-track (plist-get o :track))))
+ (let ((track (seq-find (lambda (track) (string= (plist-get o :track) (plist-get track :name)))
+ emacsconf-tracks)))
(when track
(plist-put o :watch-url (concat emacsconf-base-url emacsconf-year "/watch/" (plist-get track :id)))
(plist-put o :webchat-url
@@ -723,9 +724,10 @@ The subheading should match `emacsconf-abstract-heading-regexp'."
(plist-put o :qa-link (format "<a href=\"%s\">%s</a>" (plist-get o :webchat-url) (plist-get o :qa-info))))
((string-match "pad" (plist-get o :q-and-a))
(plist-put o :qa-info "Etherpad")
- (plist-put o :qa-link (format "<a href=\"%s\">%s</a>"
- (plist-get o :pad-url)
- (plist-get o :qa-info))))
+ (plist-put o :qa-link (if (plist-get o :pad-url)
+ (format "<a href=\"%s\">%s</a>"
+ (plist-get o :pad-url)
+ (plist-get o :qa-info)))))
(t (plist-put o :qa-info "none")
(plist-put o :qa-link "none")))
(plist-put o :pad-url (format "https://pad.emacsconf.org/%s-%s" emacsconf-year (plist-get o :slug)))
@@ -1183,6 +1185,8 @@ The subheading should match `emacsconf-abstract-heading-regexp'."
:status "offline")))
(defun emacsconf-get-track (name)
+ "Get the track for NAME.
+NAME could be a track name, a talk name, or a list."
(when (and (listp name) (plist-get name :track))
(setq name (plist-get name :track)))
(if (stringp name)
@@ -1192,7 +1196,7 @@ The subheading should match `emacsconf-abstract-heading-regexp'."
emacsconf-tracks)
(let ((talk (emacsconf-resolve-talk name)))
(seq-find (lambda (track) (or (string= (plist-get talk :track) (plist-get track :name))
- (string= (plist-get talk :track) (plist-get track :id))))
+ (string= (plist-get talk :track) (plist-get track :id))))
emacsconf-tracks))
name)
name))