summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--emacsconf-publish.el94
1 files changed, 49 insertions, 45 deletions
diff --git a/emacsconf-publish.el b/emacsconf-publish.el
index 4da789d..7a55a62 100644
--- a/emacsconf-publish.el
+++ b/emacsconf-publish.el
@@ -20,7 +20,7 @@
;;; Commentary:
-;;
+;;
;;; Code:
@@ -151,7 +151,7 @@
:audio-html (or (plist-get video :audio) "")
:chapter-list (or (plist-get video :chapter-list) "")
:resources (or (plist-get video :resources) "")
- :extra (or (plist-get talk :extra) "")
+ :extra (or (plist-get talk :extra) "")
:speaker-info (or (plist-get talk :speakers-with-pronouns) ""))))
(emacsconf-replace-plist-in-string
talk
@@ -365,7 +365,7 @@
(format "%s%s/%s" emacsconf-media-base-url (plist-get talk :conf-year)
(file-name-nondirectory (plist-get talk :audio-file)))
(file-name-nondirectory (plist-get talk :audio-file))))
- "")
+ "")
:resources
(emacsconf-replace-plist-in-string
info
@@ -479,7 +479,7 @@ resources."
:video-file (emacsconf-talk-file o "--answers.webm")
:audio-file (emacsconf-talk-file o "--answers.opus")
:chapter-file (emacsconf-talk-file o "--answers--chapters.vtt"))
-
+
o)
(list "--answers.webm" "--answers.vtt" "--answers--chapters.vtt" "--answers.opus")))
"")))
@@ -544,8 +544,8 @@ resources."
"")))
(concat
"[[!toc ]]
-Format: ${format}
-${pad-info}${irc-info}${status-info}${schedule-info}\n"
+Format: ${format}
+${pad-info}${irc-info}${status-info}${schedule-info}\n"
(if (plist-get o :alternate-apac)
(format "[[!inline pages=\"internal(%s/inline-alternate)\" raw=\"yes\"]] \n" emacsconf-year)
"")
@@ -585,7 +585,7 @@ ${pad-info}${irc-info}${status-info}${schedule-info}\n"
(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))
+ (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)))
@@ -621,7 +621,7 @@ This includes the intro note, the schedule, and talk resources."
(setq info (or info (emacsconf-publish-prepare-for-display (emacsconf-get-talk-info))))
(with-temp-file (expand-file-name (format "%s-before.md" (plist-get talk :slug))
(expand-file-name "info" (expand-file-name emacsconf-year emacsconf-directory)))
-
+
(insert "<!-- Automatically generated by emacsconf-publish-before-page -->\n")
(insert (emacsconf-surround "" (plist-get talk :intro-note) "\n\n" ""))
(let ((is-live (emacsconf-talk-live-p talk)))
@@ -659,7 +659,7 @@ This includes the intro note, the schedule, and talk resources."
(defun emacsconf-publish-format-transcript (talk &optional video-id lang)
"Format the transcript for TALK, adding paragraph markers when possible."
- (require 'subed)
+ (require 'subed)
(let* ((chapters (plist-get talk :chapter-file))
(subtitles
(subed-parse-file (if lang
@@ -820,7 +820,7 @@ Back to the [[talks]] \n"
(lambda (o)
(if (null (plist-get o :slug))
(format "<tr><td colspan=\"3\">%s</td></tr>" (emacsconf-format-talk-link o))
- (format "<tr><td>%s</td><td>%s</td><td>%s</td><tr>"
+ (format "<tr><td>%s</td><td>%s</td><td>%s</td><tr>"
(plist-get o :time)
(emacsconf-format-talk-link o)
(plist-get o :speakers))))
@@ -994,7 +994,7 @@ Entries are sorted chronologically, with different tracks interleaved."
"draft-schedule.md"
(expand-file-name emacsconf-year emacsconf-directory))
(insert
- "[[!sidebar content=\"\"]]\n\n"
+ "[[!sidebar content=\"\"]]\n\n"
"This is a *DRAFT* schedule.\n"
(let ((emacsconf-publishing-phase 'schedule))
(emacsconf-publish-format-interleaved-schedule info))))))
@@ -1013,8 +1013,8 @@ Entries are sorted chronologically, with different tracks interleaved."
(plist-get o :speakers)))
(emacsconf-filter-talks info)))
(captioned (seq-filter (lambda (o) (plist-get o :captioner)) talks))
- (received (seq-remove (lambda (o)
- (plist-get o :captioner))
+ (received (seq-remove (lambda (o)
+ (plist-get o :captioner))
talks)))
(format "<div>%d talks total: %d captioned (%d min), %d waiting for captions (%d min)</div>"
(length talks)
@@ -1042,7 +1042,7 @@ 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)
+ :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)
@@ -1172,7 +1172,7 @@ Entries are sorted chronologically, with different tracks interleaved."
(setq f (append
f
(list :extra
-
+
(concat "<div class=\"caption-note\">"
(emacsconf-surround "Being captioned by " (plist-get f :captioner) " " "")
(emacsconf-surround "Note: " (plist-get f :caption-note) "" "")
@@ -1251,7 +1251,7 @@ Entries are sorted chronologically, with different tracks interleaved."
"<ul>"
(mapconcat
(lambda (status)
- (concat "<li>" status ": "
+ (concat "<li>" status ": "
(mapconcat (lambda (o) (format "<a href=\"#%s\">%s</a>"
(plist-get o :slug)
(plist-get o :slug)))
@@ -1267,7 +1267,7 @@ Entries are sorted chronologically, with different tracks interleaved."
('prerec
(concat
(emacsconf-publish-backstage-processing by-status files)
- (emacsconf-publish-backstage-to-assign by-status files)
+ (emacsconf-publish-backstage-to-assign by-status files)
(emacsconf-publish-backstage-to-caption by-status files)
(emacsconf-publish-backstage-to-stream by-status files)))
('harvest
@@ -1317,7 +1317,7 @@ answers without needing to listen to everything again. You can see <a href=\"htt
(format-time-string "%Y-%m-%d" (plist-get f :start-time))
(plist-get (emacsconf-get-track f) :channel)
(format-time-string "%Y-%m-%d" (plist-get f :start-time))
- (plist-get (emacsconf-get-track f) :channel))
+ (plist-get (emacsconf-get-track f) :channel))
(emacsconf-surround ", <a href=\""
(if (file-exists-p (expand-file-name (concat (plist-get f :file-prefix) "--pad.txt")
emacsconf-cache-dir))
@@ -1429,7 +1429,7 @@ ${include}
(interactive)
(let ((info (emacsconf-publish-prepare-for-display (emacsconf-filter-talks (emacsconf-get-talk-info))))
(files (directory-files emacsconf-public-media-directory)))
- (with-temp-file (expand-file-name "all-include.md" (expand-file-name emacsconf-year emacsconf-directory))
+ (with-temp-file (expand-file-name "all-include.md" (expand-file-name emacsconf-year emacsconf-directory))
(insert
"<ol class=\"videos\">"
(mapconcat
@@ -1476,7 +1476,7 @@ ${include}
:md (mapconcat (lambda (chapter)
(concat
(if (= (elt chapter 1) 0)
- "00:00"
+ "00:00"
(format-seconds "%.2h:%z%.2m:%.2s" (floor (/ (elt chapter 1) 1000))))
(format ".%03d" (mod (elt chapter 1) 1000))
" "
@@ -1490,7 +1490,7 @@ ${include}
(lambda (chapter)
(format "%s.%03d %s"
(if (= (elt chapter 1) 0)
- "00:00"
+ "00:00"
(format-seconds "%.2h:%z%.2m:%.2s" (floor (/ (elt chapter 1) 1000))))
(mod (elt chapter 1) 1000)
(elt chapter 3)))
@@ -1544,20 +1544,24 @@ ${include}
(defun emacsconf-publish-talks-json ()
"Return JSON format with a subset of talk information."
- (json-encode
- (list
- :talks
- (mapcar
- (lambda (o)
- (apply
- 'list
- (cons :start-time (format-time-string "%FT%T%z" (plist-get o :start-time) t))
- (cons :end-time (format-time-string "%FT%T%z" (plist-get o :end-time) t))
- (mapcar
- (lambda (field)
- (cons field (plist-get o field)))
- '(:slug :title :speakers :pronouns :pronunciation :url :track :file-prefix :qa-url))))
- (emacsconf-filter-talks (emacsconf-get-talk-info))))))
+ (let ((emacsconf-publishing-phase 'conference))
+ (json-encode
+ (list
+ :talks
+ (mapcar
+ (lambda (o)
+ (apply
+ 'list
+ (cons :start-time (format-time-string "%FT%T%z" (plist-get o :start-time) t))
+ (cons :end-time (format-time-string "%FT%T%z" (plist-get o :end-time) t))
+ (mapcar
+ (lambda (field)
+ (cons field (plist-get o field)))
+ '(:slug :title :speakers :pronouns :pronunciation :url :track :file-prefix
+ :qa-url
+ :qa-type
+ :qa-backstage-url))))
+ (emacsconf-filter-talks (emacsconf-get-talk-info)))))))
(defun emacsconf-publish-talks-json-to-files ()
"Export talk information as JSON so that we can use it in shell scripts."
@@ -1678,7 +1682,7 @@ ${include}
<li>sample text</li>
<li>sample text</li>
</ul>
- " (plist-get o :slug) (plist-get o :title) (plist-get o :speakers) url url))) talks "<br/><br/>\n")
+ " (plist-get o :slug) (plist-get o :title) (plist-get o :speakers) url url))) talks "<br/><br/>\n")
"<br/><br/>-------------------------------------------------------------------------------------------------<br/>
<strong>General Feedback: What went well?</strong><br/><br/>
<ul>
@@ -1897,8 +1901,8 @@ This video is available under the terms of the Creative Commons Attribution-Shar
(wiki-captions-directory (expand-file-name "captions" (expand-file-name emacsconf-year emacsconf-directory))))
(org-entry-put (point) "PUBLIC" "1")
(when (file-exists-p video-file)
- (emacsconf-youtube-edit)
- (emacsconf-toobnix-edit)
+ (emacsconf-youtube-edit)
+ (emacsconf-toobnix-edit)
(emacsconf-publish-update-talk (emacsconf-get-talk-info-for-subtree)))
;; (copy-file (emacsconf-get-preferred-video slug) emacsconf-public-media-directory t)
;; (mapc (lambda (ext)
@@ -1984,11 +1988,11 @@ This video is available under the terms of the Creative Commons Attribution-Shar
:end-info (emacsconf-surround " - <span class=\"sched-end\">" (plist-get talk :end) "</span>" "")
:track-info (emacsconf-surround (format " <span class=\"sched-track %s\">" (or (plist-get talk :track) "")) (plist-get talk :track) "</span>" "")
:q-info (emacsconf-surround " <span class=\"sched-q-and-a\">Q&amp;A: " (plist-get talk :qa-link) "</span>; " "")
- :pad-info (emacsconf-surround " <span class=\"sched-pad\"> <a href=\""
+ :pad-info (emacsconf-surround " <span class=\"sched-pad\"> <a href=\""
(plist-get talk :pad-url) "\">Etherpad</a></span>; " "")
:slug-info (emacsconf-surround " <span class=\"sched-slug\">id:" (plist-get talk :slug) "</span>" "")
:speaker-info (emacsconf-surround " <div class=\"sched-speakers\">" (plist-get talk :speakers-with-pronouns) "</div>" "")
- :resources-info (emacsconf-surround "<ul class=\"resources\">" (plist-get talk :resources) "</ul>" "")))
+ :resources-info (emacsconf-surround "<ul class=\"resources\">" (plist-get talk :resources) "</ul>" "")))
"<div data-start=\"${startutc}\" data-end=\"${endutc}\" class=\"sched-entry track-${track}\">
<div class=\"sched-meta\"><span class=\"sched-time\">${start-info}${end-info}</span>${track-info}${pad-info}${q-info}${slug-info}</div>
<div class=\"sched-title\"><a href=\"${base-url}${url}\">${title}</a></div>
@@ -2101,9 +2105,9 @@ If you don't have a streaming media player, you can watch using the player below
(let* ((tracks
(mapcar (lambda (track)
(append (list
- :year emacsconf-year
- :stream (concat emacsconf-stream-base (plist-get track :id) ".webm")
- :stream-hires (concat emacsconf-stream-base (plist-get track :id) ".webm")
+ :year emacsconf-year
+ :stream (concat emacsconf-stream-base (plist-get track :id) ".webm")
+ :stream-hires (concat emacsconf-stream-base (plist-get track :id) ".webm")
:480p (concat emacsconf-stream-base (plist-get track :id) "-480p.webm"))
track))
emacsconf-tracks))
@@ -2352,7 +2356,7 @@ There is no live Q&A room for ${title}. You can find more information about the
"")))
talk)
(concat
- (if include-title
+ (if include-title
"${conf-name} ${year}: ${title} - ${speakers-with-pronouns}\n"
"")
"${absolute-url}
@@ -2546,5 +2550,5 @@ This video is available under the terms of the Creative Commons Attribution-Shar
emacsconf-backstage-dir)
t)
(emacsconf-publish-update-talk slug)))
-;;
+;;
(provide 'emacsconf-publish)