diff options
author | Arun Isaac | 2017-02-27 23:22:53 +0530 |
---|---|---|
committer | Arun Isaac | 2017-02-27 23:22:53 +0530 |
commit | e3e7142e16d2bda0d5670f55057deb694c97e102 (patch) | |
tree | da7ba347f1fe70c017814a22f5ae3786e3d5e656 | |
parent | 22dfd7ec956885e36bfdd12ab98d1aa43ebfde4b (diff) | |
download | exiftool.el-e3e7142e16d2bda0d5670f55057deb694c97e102.tar.gz exiftool.el-e3e7142e16d2bda0d5670f55057deb694c97e102.tar.lz exiftool.el-e3e7142e16d2bda0d5670f55057deb694c97e102.zip |
Support copying specific tags.
* el-exiftool.el (el-exiftool-copy): Support copying specific tags
with the &rest `tags' argument.
-rw-r--r-- | el-exiftool.el | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/el-exiftool.el b/el-exiftool.el index aea4ba8..4f6851b 100644 --- a/el-exiftool.el +++ b/el-exiftool.el @@ -89,11 +89,16 @@ value. If no TAGS are specified, read all tags from FILE. (list file))) "\n+"))) -(defun el-exiftool-copy (source destination) - "Copy tags from SOURCE file to DESTINATION file." - (el-exiftool-command "-overwrite_original" - "-tagsFromFile" source - "-all:all" destination) +(defun el-exiftool-copy (source destination &rest tags) + "Copy TAGS from SOURCE file to DESTINATION file. + +If no TAGS are specified, copy all tags from SOURCE." + (apply 'el-exiftool-command + "-overwrite_original" + "-tagsFromFile" source + (append + (mapcar (apply-partially 'format "-%s") tags) + (list "-all:all" destination))) (message "Tags from %s copied to %s" source destination) destination) |