summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2022-10-25 12:17:37 -0400
committerSacha Chua <sacha@sachachua.com>2022-10-25 12:17:37 -0400
commit8afaefdeb54b8ca3805e2c2beb749c408654cabd (patch)
treed00e45e1b4770ad3f79a31af46e7c233e01f4cee
parentbfdac52a1bc4ed16efcbdbc4953ff769726b86eb (diff)
downloademacsconf-el-8afaefdeb54b8ca3805e2c2beb749c408654cabd.tar.xz
emacsconf-el-8afaefdeb54b8ca3805e2c2beb749c408654cabd.zip
Make it easy to get to res
-rw-r--r--emacsconf.el13
1 files changed, 9 insertions, 4 deletions
diff --git a/emacsconf.el b/emacsconf.el
index e036258..7ab44f4 100644
--- a/emacsconf.el
+++ b/emacsconf.el
@@ -79,6 +79,7 @@
(defvar emacsconf-chat-base "https://chat.emacsconf.org/")
(defvar emacsconf-backstage-dir "/ssh:media:/var/www/media.emacsconf.org/2022/backstage")
(defvar emacsconf-upload-dir "/ssh:media:/srv/upload")
+(defvar emacsconf-res-dir "/ssh:res:~/current")
(defun emacsconf-upload-dired ()
(interactive)
@@ -86,6 +87,9 @@
(defun emacsconf-backstage-dired ()
(interactive)
(dired emacsconf-backstage-dir "-tl"))
+(defun emacsconf-res-dired ()
+ (interactive)
+ (dired emacsconf-res-dir "-tl"))
(defun emacsconf-slugify (s)
(replace-regexp-in-string " +" "-" (replace-regexp-in-string "[^a-z0-9 ]" "" (downcase s))))
@@ -130,15 +134,16 @@
(call-process "yt-dlp" nil buf t "--write-sub" "--write-auto-sub" "--no-warnings" "--sub-lang" "en" "--skip-download" "--sub-format" "srv2" "-o" filename
(plist-get talk :youtube-url))
(with-current-buffer (find-file-noselect (concat filename ".en.srv2"))
- (emacsconf-upload-to-backstage-and-rename talk "main")))))
+ (emacsconf-upload-to-backstage-and-rename talk "main--srt")))))
(defun emacsconf-upload-to-backstage-and-rename (talk filename)
(interactive (let ((talk (emacsconf-complete-talk-info))
(base (file-name-base (buffer-file-name))))
(list
talk
- (if (string-match (concat "^" (regexp-quote (plist-get talk :video-slug)) "--\\([a-z]+\\)")
- base)
+ (if (and (not current-prefix-arg)
+ (string-match (concat "^" (regexp-quote (plist-get talk :video-slug)) "--\\([a-z]+\\)")
+ base))
(match-string 1 base)
(read-string (format "Filename (%s): " base)
nil nil
@@ -885,7 +890,7 @@
(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)))
+ '(:slug :title :speakers :pronouns :pronunciation :url :track :video-slug)))
)
(emacsconf-filter-talks (emacsconf-get-talk-info)))))))))