summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2023-12-11 17:23:51 -0500
committerSacha Chua <sacha@sachachua.com>2023-12-11 17:23:51 -0500
commit746a34134f7c21789031c2ef88d37d09dbb47cbc (patch)
treee476598b1c50c0f85722fb379d875e2a414df485
parent8ff37afaebc8b96cb431f388fee3a5add8a485f3 (diff)
downloademacsconf-el-746a34134f7c21789031c2ef88d37d09dbb47cbc.tar.xz
emacsconf-el-746a34134f7c21789031c2ef88d37d09dbb47cbc.zip
add check playlists, spookfox
Diffstat (limited to '')
-rw-r--r--emacsconf-extract.el33
1 files changed, 33 insertions, 0 deletions
diff --git a/emacsconf-extract.el b/emacsconf-extract.el
index e7c4a9d..b042f66 100644
--- a/emacsconf-extract.el
+++ b/emacsconf-extract.el
@@ -1487,5 +1487,38 @@ If QA is non-nil, treat it as a Q&A video."
(emacsconf-extract-toobnix-store-url)
(shell-command "xdotool key Alt+Tab sleep 1 key Ctrl+w Alt+Tab"))
+(defun emacsconf-extract-youtube-spookfox-add-playlist-numbers ()
+ "Number the playlist for easier checking.
+Related: `emacsconf-extract-check-playlists'."
+ (interactive)
+ (spookfox-js-injection-eval-in-active-tab "[...document.querySelectorAll('ytd-playlist-video-renderer')].forEach((o, i) => { o.querySelector('.number')?.remove(); let div = document.createElement('div'); div.classList.add('number'); div.textContent = i; o.prepend(div) }))" t))
+
+(defun emacsconf-extract-check-playlists ()
+ "Return a table for checking playlist order."
+ (let ((pos 0))
+ (seq-mapcat (lambda (o)
+ (delq
+ nil
+ (list
+ (when (emacsconf-talk-file o "--main.webm")
+ (incf pos)
+ (list pos
+ (plist-get o :title)
+ (org-link-make-string
+ (plist-get o :youtube-url)
+ "YouTube")
+ (org-link-make-string
+ (plist-get o :toobnix-url)
+ "Toobnix")))
+ (when (emacsconf-talk-file o "--answers.webm")
+ (incf pos)
+ (list pos (concat "Q&A: " (plist-get o :title))
+ (org-link-make-string
+ (plist-get o :qa-youtube-url)
+ "YouTube")
+ (org-link-make-string
+ (plist-get o :qa-toobnix-url)
+ "Toobnix"))))))
+ (emacsconf-publish-prepare-for-display (emacsconf-get-talk-info)))))
(provide 'emacsconf-extract)
;;; emacsconf-extract.el ends here