(est-eval-value-as-Web-yunzi-char): New function.
authorMORIOKA Tomohiko <tomo.git@chise.org>
Mon, 14 Dec 2020 17:05:29 +0000 (02:05 +0900)
committerMORIOKA Tomohiko <tomo.git@chise.org>
Tue, 9 Feb 2021 08:28:58 +0000 (17:28 +0900)
(est-eval-value-as-Web-yunzi-char-list): New function.
(est-eval-apply-value): Use `est-eval-value-as-Web-yunzi-char-list'
for format `space-separated-Web-yunzi-char-list'.

est-eval.el

index 65db614..7d5b55a 100644 (file)
                          (daijiten-page-number-to-ndl-950498 value)))
            value)))
 
+(defun est-eval-value-as-Web-yunzi-char (value)
+  (if (char-or-char-int-p value)
+      (list 'link
+           (list :ref
+                 (format "http://suzukish.s252.xrea.com/search/inkyo/yunzi/%c"
+                         value))
+           (format "/%s/" (char-to-string value)))))
+
 (defun est-eval-value-as-object-list (value &optional separator subtype)
   (if (and (listp value)
           (listp (cdr value)))
        (error (format "%s" value)))
     (format "%s" value)))
 
+(defun est-eval-value-as-Web-yunzi-char-list (value &optional separator subtype)
+  (if (and (listp value)
+          (listp (cdr value)))
+      (condition-case nil
+         (let (props)
+           (if separator
+               (setq props (list :separator separator)))
+           (if subtype
+               (setq props (list* :subtype subtype props)))
+           (list* 'list props
+                  (mapcar #'est-eval-value-as-Web-yunzi-char value)))
+       (error (format "%s" value)))
+    (format "%s" value)))
+
 (defun est-eval-value-as-creators-names (value &optional subtype)
   (if (listp value)
       (let (role-name)
          (est-eval-value-as-journal-volumes value))
         ((eq format 'space-separated-daijiten-page-list)
          (est-eval-value-as-daijiten-page-list value " "))
+        ((eq format 'space-separated-Web-yunzi-char-list)
+         (est-eval-value-as-Web-yunzi-char-list value " "))
         (t
          (est-eval-value-default value)
          ))