From 1e12d2d5561616230f70bdc3ce25a785af0b4f6e Mon Sep 17 00:00:00 2001 From: MORIOKA Tomohiko Date: Sun, 12 Jun 2016 22:29:55 +0900 Subject: [PATCH] (est-eval-value-as-image-resource): New function. (est-eval-value-as-object): Use `est-eval-value-as-image-resource' for `image-resource' genre. --- est-eval.el | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/est-eval.el b/est-eval.el index 3635eaf..3f47739 100644 --- a/est-eval.el +++ b/est-eval.el @@ -64,6 +64,15 @@ value))) (est-eval-value-as-S-exp value))) +(defun est-eval-value-as-image-resource (value) + (let ((name (concord-object-get value 'name))) + (if (concord-object-get value 'image-offset-x) + (list 'img (list* :src (or (concord-object-get value '=location@iiif) + (concord-object-get value '=location)) + (if name + (list :alt name)))) + name))) + ;; (defun est-journal-volume-object-get-volume-format (spec feature) ;; (when (integerp spec) ;; (setq spec (format "%02d" spec))) @@ -73,7 +82,7 @@ ;; ((string= spec "01") `((decimal (:feature ,feature)) "期")) ;; ((string= spec "02") `((decimal (:feature ,feature)) "巻")) ;; ((string= spec "03") `((decimal (:feature ,feature)) "号")) -;; ((string= spec "04") `((decimal (:feature ,feature)) "&HD-JA-4A54;")) +;; ((string= spec "04") `((decimal (:feature ,feature)) "&AJ1-03620;")) ;; ((string= spec "05") `((decimal (:feature ,feature)) "&HD-JA-4A53;")) ;; ((string= spec "06") `((decimal (:feature ,feature)) "集")) ;; ((string= spec "07") `((decimal (:feature ,feature)) "輯")) @@ -327,7 +336,10 @@ ;; ((eq genre 'creator@ruimoku) ;; (est-eval-creator value) ;; ) - (t + ((eq genre 'image-resource) + (est-eval-value-as-image-resource value) + ) + (t (setq genre-o (concord-decode-object '=id genre 'genre)) (or (and genre-o (setq format -- 1.7.10.4