aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2019-09-02 22:58:49 +0530
committerArun Isaac2019-09-02 22:58:49 +0530
commit2d02cb5655718ffa1737c7f4b87d7702d31affdb (patch)
tree7fcc9ae6a29ef00f4181d622243a827fa49f19d2
parent3f2eef6a230278fc4ed3cbc71d6bbcfc80f3f13c (diff)
downloadennum-2d02cb5655718ffa1737c7f4b87d7702d31affdb.tar.gz
ennum-2d02cb5655718ffa1737c7f4b87d7702d31affdb.tar.lz
ennum-2d02cb5655718ffa1737c7f4b87d7702d31affdb.zip
Publish video and poster, not just one.
* ennu.el (ennu-publish-link): Publish video and poster, not just one of them. Return a list of operations instead of a single operation. (ennu-publish-post): Accept a list of operations from ennu-publish-link.
-rw-r--r--ennu.el21
1 files changed, 12 insertions, 9 deletions
diff --git a/ennu.el b/ennu.el
index f8bab98..a8ac483 100644
--- a/ennu.el
+++ b/ennu.el
@@ -112,7 +112,7 @@ last form in BODY."
;; tangle-dir)
;; t)))
(let ((link-publish-operations
- (seq-map 'ennu-publish-link (seq-mapcat 'ennu-post-links posts)))
+ (seq-mapcat 'ennu-publish-link (seq-mapcat 'ennu-post-links posts)))
(input-post-files (seq-map 'ennu-post-filename posts)))
(cons
(ennu-make-operation
@@ -381,16 +381,19 @@ if DESTINATION already exists."
(defun ennu-publish-link (link)
(pcase link
(`("image" . ,path)
- (ennu-publish-image
- (list (ennu-setting :default-image-width)
- (ennu-setting :image-link-width))
- (ennu--expand-relative path (ennu-setting :images-directory))))
+ (list
+ (ennu-publish-image
+ (list (ennu-setting :default-image-width)
+ (ennu-setting :image-link-width))
+ (ennu--expand-relative path (ennu-setting :images-directory)))))
(`("static" . ,path)
- (ennu-publish-copy (ennu--expand-relative path (ennu-setting :static-directory))))
+ (list
+ (ennu-publish-copy (ennu--expand-relative path (ennu-setting :static-directory)))))
(`("video" . ,path)
- (ennu-publish-copy (ennu--expand-relative path (ennu-setting :video-directory)))
- (ennu-publish-copy (ennu--expand-relative (ennu-video-poster path)
- (ennu-setting :images-directory))))))
+ (list
+ (ennu-publish-copy (ennu--expand-relative path (ennu-setting :video-directory)))
+ (ennu-publish-copy (ennu--expand-relative (ennu-video-poster path)
+ (ennu-setting :images-directory)))))))
(defmacro ennu-with-current-directory (directory &rest body)
"Change to DIRECTORY, evaluate BODY and restore the current