From: MORIOKA Tomohiko Date: Sun, 12 Jun 2016 13:29:55 +0000 (+0900) Subject: (est-eval-value-as-image-resource): New function. X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e12d2d5561616230f70bdc3ce25a785af0b4f6e;p=chise%2Fest.git (est-eval-value-as-image-resource): New function. (est-eval-value-as-object): Use `est-eval-value-as-image-resource' for `image-resource' genre. --- 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