diff options
author | EmacsConf <emacsconf-org@gnu.org> | 2022-11-04 16:57:22 -0700 |
---|---|---|
committer | EmacsConf <emacsconf-org@gnu.org> | 2022-11-04 16:57:22 -0700 |
commit | 86fdd4a416191722b17f73109e735600c7c81156 (patch) | |
tree | 608e7f21593d449b65c06a9f1fa30a005b4c97dd | |
parent | d33f34beada6ba579059dfb5c3b442d4af666c3d (diff) | |
parent | 67d7aac3235f3fba73b82e1f7d2660fbb59e44dd (diff) | |
download | emacsconf-el-86fdd4a416191722b17f73109e735600c7c81156.tar.xz emacsconf-el-86fdd4a416191722b17f73109e735600c7c81156.zip |
Merge branch 'main' of git.emacsconf.org:pub/emacsconf-el
-rw-r--r-- | emacsconf-publish.el | 4 | ||||
-rw-r--r-- | emacsconf-subed.el | 4 | ||||
-rw-r--r-- | emacsconf.el | 17 |
3 files changed, 12 insertions, 13 deletions
diff --git a/emacsconf-publish.el b/emacsconf-publish.el index d4d8405..a90803b 100644 --- a/emacsconf-publish.el +++ b/emacsconf-publish.el @@ -1303,8 +1303,8 @@ Entries are sorted chronologically, with different tracks interleaved." duration) (unless (file-exists-p main) (setq main video-file-name)) - (org-entry-put (point) "VIDEO_FILE" (file-name-nondirectory main)) - (org-entry-put (point) "VIDEO_FILE_SIZE" (file-size-human-readable (file-attribute-size (file-attributes main)))) + (org-entry-put (point) "VIDEO_FILE" (file-name-nondirectory video-file)) + (org-entry-put (point) "VIDEO_FILE_SIZE" (file-size-human-readable (file-attribute-size (file-attributes video-file)))) (unless (plist-get talk :video-time) (setq duration (/ (compile-media-get-file-duration-ms video-file) 1000)) (org-entry-put (point) "VIDEO_DURATION" (format-seconds "%m:%.2s" duration)) diff --git a/emacsconf-subed.el b/emacsconf-subed.el index 93542ac..9aca0e0 100644 --- a/emacsconf-subed.el +++ b/emacsconf-subed.el @@ -149,15 +149,15 @@ "Open the caption file for this talk. Create it if necessary." (interactive) - (require 'compile-media) (let ((video-slug (org-entry-get (point) "VIDEO_SLUG"))) (find-file - (or (car (directory-files emacsconf-captions-directory + (or (car (directory-files emacsconf-cache-dir t (concat (regexp-quote video-slug) "--main\\.\\(srt\\|vtt\\)"))) (expand-file-name (concat video-slug "--main.vtt") "captions"))) (when (eobp) + (require 'compile-media) (insert "WEBVTT\n\n0:00:00.000 --> " (compile-media-msecs-to-timestamp (compile-media-get-file-duration-ms (subed-guess-video-file))) diff --git a/emacsconf.el b/emacsconf.el index 1a8e178..60f9ac2 100644 --- a/emacsconf.el +++ b/emacsconf.el @@ -169,10 +169,7 @@ (interactive (let-alist (json-parse-string (buffer-string) :object-type 'alist) (list (emacsconf-complete-talk-info) .metadata.key - (read-string (format "Filename (%s): " - (file-name-base .metadata.name)) - nil nil - (file-name-base .metadata.name))))) + (read-string (format "Filename: "))))) (let ((new-filename (concat (plist-get talk :video-slug) (if (string= filename "") filename @@ -183,10 +180,12 @@ (copy-file key (expand-file-name new-filename emacsconf-backstage-dir) t) - (copy-file key (expand-file-name new-filename emacsconf-cache-dir)) - (unless (file-directory-p (expand-file-name (plist-get talk :slug) emacsconf-res-dir)) - (make-directory (expand-file-name (plist-get talk :slug) emacsconf-res-dir))) - (copy-file (expand-file-name new-filename emacsconf-cache-dir) (expand-file-name new-filename (expand-file-name (plist-get talk :slug) emacsconf-res-dir))))) + ;; (copy-file key (expand-file-name new-filename emacsconf-cache-dir)) + ;; (unless (file-directory-p (expand-file-name (plist-get talk :slug) emacsconf-res-dir)) + ;; (make-directory (expand-file-name (plist-get talk :slug) emacsconf-res-dir))) + ;; (copy-file (expand-file-name new-filename emacsconf-cache-dir) + ;; (expand-file-name new-filename (expand-file-name (plist-get talk :slug) emacsconf-res-dir))) + )) (defcustom emacsconf-download-directory "~/Downloads" "Directory to check for downloaded files." @@ -199,7 +198,7 @@ (defun emacsconf-find-captions-from-slug (search) (interactive (list (emacsconf-complete-talk))) - (emacsconf-with-talk-heading search (emacsconf-find-captions))) + (emacsconf-with-talk-heading search (emacsconf-subed-find-captions))) (defun emacsconf-edit-wiki-page (search) (interactive (list (emacsconf-complete-talk))) |