From: MORIOKA Tomohiko Date: Mon, 14 Dec 2020 17:05:29 +0000 (+0900) Subject: (est-eval-value-as-Web-yunzi-char): New function. X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=458cd2ffeb5a3a2ba326f47d85d61fc2471821e3;p=chise%2Fest.git (est-eval-value-as-Web-yunzi-char): New function. (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'. --- diff --git a/est-eval.el b/est-eval.el index 65db614..7d5b55a 100644 --- a/est-eval.el +++ b/est-eval.el @@ -456,6 +456,14 @@ (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))) @@ -700,6 +708,20 @@ (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) @@ -868,6 +890,8 @@ (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) ))