summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2023-10-10 10:23:30 -0400
committerSacha Chua <sacha@sachachua.com>2023-10-10 10:23:30 -0400
commit95b08a83517625308ebc80ea204b99914bfeb305 (patch)
tree93e7c337a22c506710fad9a755342539f823851a
parent0c6c8d8b6f29e310154323cf7806874c28040702 (diff)
downloademacsconf-el-95b08a83517625308ebc80ea204b99914bfeb305.tar.xz
emacsconf-el-95b08a83517625308ebc80ea204b99914bfeb305.zip
acknowledge uploads
-rw-r--r--emacsconf-mail.el58
1 files changed, 58 insertions, 0 deletions
diff --git a/emacsconf-mail.el b/emacsconf-mail.el
index 092abb2..269d1e7 100644
--- a/emacsconf-mail.el
+++ b/emacsconf-mail.el
@@ -984,5 +984,63 @@ This minimizes the risk of mail delivery issues and radio silence."
(emacsconf-add-to-talk-logbook talk note))
(emacsconf-mail-talks email))))
+(defun emacsconf-mail-acknowledge-upload (talk)
+ "Acknowledge uploaded files for TALK."
+ (interactive (list (emacsconf-complete-talk-info)))
+ (emacsconf-mail-prepare
+ '(:subject "${conf-name} ${year}: received uploaded files for ${title}"
+ :cc "emacsconf-submit@gnu.org"
+ :reply-to "emacsconf-submit@gnu.org, ${email}, ${user-email}"
+ :mail-followup-to "emacsconf-submit@gnu.org, ${email}, ${user-email}"
+ :body
+ "Hi, ${speakers-short}!
+
+Just a quick note to let you know that I've downloaded your file${plural} for \"${title}\".
+Now we have the following file${plural} starting with ${file-prefix}:
+
+${file-list}
+We'll be working on captioning your talk over the next few weeks. We'll e-mail again a little closer to the conference with schedule updates and other useful information. If you want to upload a new version, you can upload it the same way you did the previous one.
+
+Please feel free to e-mail us at ${submit-email} if you need help updating the talk wiki page at ${base}${url} or if you have other questions.
+
+Thank you so much for all the work you put into preparing a talk for ${conf-name} ${year}, and thank you for submitting the prerecorded video before the conference!
+
+${signature}")
+ (plist-get talk :email)
+ (let ((files (directory-files emacsconf-cache-dir
+ t (regexp-quote (plist-get talk :file-prefix)))))
+ (list
+ :title (plist-get talk :title)
+ :conf-name emacsconf-name
+ :year emacsconf-year
+ :base emacsconf-base-url
+ :url (plist-get talk :url)
+ :email (plist-get talk :email)
+ :submit-email emacsconf-submit-email
+ :plural (if (= 1 (length files)) "" "s")
+ :file-prefix (plist-get talk :file-prefix)
+ :signature user-full-name
+ :user-email user-mail-address
+ :speakers-short (plist-get talk :speakers-short)
+ :file-list
+ (mapconcat
+ (lambda (file)
+ (concat
+ (format "- %s\n File size: %s, MD5 sum: %s\n"
+ (replace-regexp-in-string (plist-get talk :file-prefix)
+ "" (file-name-nondirectory file))
+ (file-size-human-readable (file-attribute-size (file-attributes file)))
+ (string-trim
+ (shell-command-to-string
+ (concat "md5sum " (shell-quote-argument file) " | cut -f 1 -d ' '"))))
+ (if (member (file-name-extension file) subed-video-extensions)
+ (format " (around %d minutes long)\n"
+ (ceiling
+ (/ (compile-media-get-file-duration-ms file)
+ 60000.0)))
+ "")))
+ files
+ "\n")))))
+
(provide 'emacsconf-mail)
;;; emacsconf-mail.el ends here