diff options
author | EmacsConf Organizers <orga@front0.emacsconf.org> | 2021-01-30 17:00:44 +0000 |
---|---|---|
committer | EmacsConf Organizers <orga@front0.emacsconf.org> | 2021-01-30 17:00:44 +0000 |
commit | 0b487f878d36f62b7a29df13e4172cf04243e45f (patch) | |
tree | 5202f7dde992fa00dabd0ed90fb620231bc6e57a /2020/organizers-notebook.org | |
parent | 677d96158e0eb1d975bb76c7a6e0c695b42aabd2 (diff) | |
parent | 42831835bf8daf375e9515f84f5f9ff2adac7f94 (diff) | |
download | emacsconf-wiki-0b487f878d36f62b7a29df13e4172cf04243e45f.tar.xz emacsconf-wiki-0b487f878d36f62b7a29df13e4172cf04243e45f.zip |
Merge branch 'master' of git://git.emacsconf.org/emacsconf-wiki
Diffstat (limited to '2020/organizers-notebook.org')
-rw-r--r-- | 2020/organizers-notebook.org | 61 |
1 files changed, 19 insertions, 42 deletions
diff --git a/2020/organizers-notebook.org b/2020/organizers-notebook.org index f3d68cdb..1eb742dd 100644 --- a/2020/organizers-notebook.org +++ b/2020/organizers-notebook.org @@ -61,11 +61,11 @@ I modified the =subed= package to work with VTT files. The modified version is a - [ ] [[./subtitles/emacsconf-2020--30-a-tour-of-vterm--questions--gabriele-bozzola-sbozzolo-autogen.vtt]] - [ ] [[./subtitles/emacsconf-2020--31-lakota-language-and-emacs--grant-shangreaux-autogen.vtt]] - [ ] [[./subtitles/emacsconf-2020--31-lakota-language-and-emacs--questions--grant-shangreaux-autogen.vtt]] -- [ ] [[./subtitles/emacsconf-2020--32-object-oriented-code-in-the-gnus-newsreader--eric-abrahamsen-autogen.vtt]] -- [ ] [[./subtitles/emacsconf-2020--33-maxima-a-computer-algebra-system-in-emacs--fermin.vtt]] +- [ ] bhavin192 [[./subtitles/emacsconf-2020--32-object-oriented-code-in-the-gnus-newsreader--eric-abrahamsen-autogen.vtt]] +- [ ] bhavin192 [[./subtitles/emacsconf-2020--33-maxima-a-computer-algebra-system-in-emacs--fermin.vtt]] - [ ] bhavin192 [[./subtitles/emacsconf-2020--34-extend-emacs-to-modern-gui-applications-with-eaf--matthew-zeng-autogen.vtt]] -- [ ] bhavin192 [[./subtitles/emacsconf-2020--35-waveing-at-repetitive-repetitive-repetitive-music-zmusic--zachary-kanfer-autogen.vtt]] -- [ ] bhavin192 [[./subtitles/emacsconf-2020--35-waveing-at-repetitive-repetitive-repetitive-music-zmusic--questions--zachary-kanfer-autogen.vtt]] +- [X] bhavin192 [[./info/35.md]] [[./subtitles/emacsconf-2020--35-waveing-at-repetitive-repetitive-repetitive-music-zmusic--zachary-kanfer-autogen.vtt]] +- [X] bhavin192 [[./info/35.md]] [[./subtitles/emacsconf-2020--35-waveing-at-repetitive-repetitive-repetitive-music-zmusic--questions--zachary-kanfer-autogen.vtt]] - [X] bhavin192 [[./info/38.md]] [[./subtitles/emacsconf-2020--38-emacs-development-update--john-wiegley.vtt]] - [X] bhavin192 [[./info/39.md]] [[./subtitles/emacsconf-2020--39-nongnu-elpa--questions--richard-stallman.vtt]] - [X] bhavin192 [[./info/39.md]] [[./subtitles/emacsconf-2020--39-nongnu-elpa--richard-stallman.vtt]] @@ -823,44 +823,21 @@ If TALK is not specified, do it in the current buffer." ,@body) ,@body)) -(defun conf/add-transcript (&optional talk) - "Try to add transcript for the current talk." - (interactive) - (conf/with-talk-info-file talk - (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)) - (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) - (with-current-buffer (find-file-noselect (expand-file-name subtitle-file conf/wiki-directory)) - (goto-char (point-min)) - (subed-mode) - (let (text) - (while (subed-forward-subtitle-text) - (setq text (cons (subed-subtitle-text) text))) - (setq all (mapconcat 'identity (reverse text) "\n")))) - (if (re-search-forward (format "<!-- transcript: %s -->[ \t]*\n\\([.\r\n]*?\\)<!-- /transcript -->" (regexp-quote subtitle-file)) nil t) - (progn - (goto-char (match-beginning 1)) - (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")), or call from a talk info page +(defun my/convert-transcript-to-directives (id) + (interactive "MID: ") + (goto-char (point-min)) + (kill-new + (concat + "<a name=\"transcript\"></a>\n# Transcript\n\n" + (cl-loop while (subed-forward-subtitle-text) + concat (format "[[!template text=\"%s\" start=\"%s\" video=\"%s\" id=subtitle]]\n" + (replace-regexp-in-string + "\n" " " + (replace-regexp-in-string + "\"" """ + (replace-regexp-in-string "[][]" "" (subed-subtitle-text)))) + (subed-vtt--msecs-to-timestamp (subed-subtitle-msecs-start)) + id))))) #+end_src * Other useful tidbits |