summaryrefslogtreecommitdiffstats
path: root/2020
diff options
context:
space:
mode:
Diffstat (limited to '2020')
-rw-r--r--2020/organizers-notebook.org17
1 files changed, 13 insertions, 4 deletions
diff --git a/2020/organizers-notebook.org b/2020/organizers-notebook.org
index 142ac539..f12e111a 100644
--- a/2020/organizers-notebook.org
+++ b/2020/organizers-notebook.org
@@ -805,7 +805,7 @@ Take advantage of provided scripts or autogenerated files
*** Add transcript sections
-#+begin_src emacs-lisp :eval no :tangle no
+#+begin_src emacs-lisp
(defvar conf/wiki-directory "~/vendor/emacsconf-wiki" "Directory that has the public conference wiki.")
(defmacro conf/with-talk-info-file (talk &rest body)
@@ -828,7 +828,13 @@ If TALK is not specified, do it in the current buffer."
(goto-char (point-min))
(let (subtitles subed-auto-find-video all)
(while (re-search-forward "subtitles=\"/\\(.+?\\)\"" nil t)
- (setq subtitles (cons (match-string 1 subtitles) subtitles)))
+ (setq subtitles (cons (match-string 1) subtitles))
+ (when (re-search-forward "^$\\|\\[View transcript" nil t)
+ (unless (string= (match-string 0) "[View transcript")
+ (insert
+ (if (string-match "questions" (car subtitles))
+ "[View transcript for Q&A](#transcript-questions)\n"
+ "[View transcript](#transcript)\n")))))
(when subtitles
(mapc
(lambda (subtitle-file)
@@ -845,13 +851,16 @@ If TALK is not specified, do it in the current buffer."
(delete-region (match-beginning 1) (match-end 1)))
(goto-char (point-max))
(insert (format "\n\n<!-- transcript: %s -->\n\n" subtitle-file))
+ (insert (if (string-match "questions" subtitle-file)
+ "<a name=\"transcript-questions\"></a>\n# Transcript: Q&A\n\n"
+ "<a name=\"transcript\"></a>\n# Transcript\n\n"))
(save-excursion (insert "\n\n<!-- /transcript -->\n")))
(save-excursion (insert all)))
(reverse subtitles))))))
-;; (conf/add-transcript (conf/find-talk "03"))
-
+;; (conf/add-transcript (conf/find-talk "03")), or call from a talk info page
#+end_src
+
* Other useful tidbits
** Restarting ikiwiki manually