diff options
author | Arun Isaac | 2017-02-27 23:21:46 +0530 |
---|---|---|
committer | Arun Isaac | 2017-02-27 23:21:46 +0530 |
commit | 22dfd7ec956885e36bfdd12ab98d1aa43ebfde4b (patch) | |
tree | e23ad2b1025c8962c03f700990a72649579d8cbe | |
parent | 890aa7d772cec8b99fb7567c32b79150e451b803 (diff) | |
download | exiftool.el-22dfd7ec956885e36bfdd12ab98d1aa43ebfde4b.tar.gz exiftool.el-22dfd7ec956885e36bfdd12ab98d1aa43ebfde4b.tar.lz exiftool.el-22dfd7ec956885e36bfdd12ab98d1aa43ebfde4b.zip |
Improve docstrings.
* el-exiftool.el (el-exiftool--tq-sync-query): Add docstring.
(el-exiftool-run, el-exiftool-command, el-exiftool-read,
el-exiftool-write): Improve docstring.
-rw-r--r-- | el-exiftool.el | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/el-exiftool.el b/el-exiftool.el index 8a2c303..aea4ba8 100644 --- a/el-exiftool.el +++ b/el-exiftool.el @@ -34,6 +34,9 @@ (require 'cl) (defun el-exiftool--tq-sync-query (tq question regexp) + "Add a transaction to transaction queue TQ, block and read response. + +See `tq-enqueue' for details of arguments QUESTION and REGEXP." (let ((response)) (tq-enqueue tq question regexp nil (lambda (closure answer) (setq response answer))) @@ -43,8 +46,9 @@ (defun el-exiftool-run () "Start an exiftool process if one is not already running. + If an exiftool process is already running, delete it, and create -a new one. Return the process object of the newly created +a new one. Return the process object of the newly created process." (when-let (exiftool (get-process "exiftool")) (delete-process exiftool)) @@ -53,9 +57,9 @@ process." (let ((tq (tq-create (el-exiftool-run)))) (defun el-exiftool-command (&rest args) "Execute a command in the currently running exiftool process. -If there is no running exiftool process, a new one will be -created. ARGS are arguments of the command to be run, as provided -to the exiftool command line application." + +ARGS are arguments of the command to be run, as provided to the +exiftool command line application." (string-trim (let ((suffix "{ready}\n")) (string-remove-suffix @@ -65,7 +69,10 @@ to the exiftool command line application." suffix)))))) (defun el-exiftool-read (file &rest tags) - "Read TAGs from FILE, and return an alist mapping tag names to corresponding values. + "Read TAGS from FILE, return an alist mapping TAGS to values. + +If a tag is not found, an empty string \"\" is returned as its +value. If no TAGS are specified, read all tags from FILE. \(fn FILE TAG...)" (mapcar @@ -93,7 +100,9 @@ to the exiftool command line application." (defun el-exiftool-write (file &rest tag-value-alist) "Write tags to FILE. -The metadata to be written is specified as (TAG . VALUE) pairs. +The metadata to be written is specified as (TAG . VALUE) +pairs. Specifying the empty string \"\" for VALUE deletes that +TAG. \(fn FILE (TAG . VALUE)...)" (apply 'el-exiftool-command |