From: MORIOKA Tomohiko Date: Wed, 12 Dec 2018 15:43:49 +0000 (+0900) Subject: (chise-turtle-uri-encode-ccs-name): Convert `!' into "._cmp_.". X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=032464b99f2e72411b3b52bd85d77f0081c75949;p=chise%2Fchiset.git (chise-turtle-uri-encode-ccs-name): Convert `!' into "._cmp_.". (char-db-turtle-insert-metadata): Add code for :references. --- diff --git a/char-db-turtle.el b/char-db-turtle.el index 1329bb6..7334165 100644 --- a/char-db-turtle.el +++ b/char-db-turtle.el @@ -226,6 +226,8 @@ "._.") ((eq c ?=) ".:.") + ((eq c ?|) + "._cmp_.") (t (char-to-string c)))) (www-uri-encode-feature-name feature-name) @@ -492,7 +494,7 @@ ) (defun char-db-turtle-insert-metadata (name value) - (let (col indent) + (let (col indent ret) (insert (format "%-7s " name)) (cond ((or (eq name :sources) @@ -505,6 +507,16 @@ (insert (format " ,\n%schisebib:%s" indent (chise-turtle-uri-encode-ccs-name source)))) nil) + ((eq name :references) + (setq ret (car value)) + (setq ret (plist-get (nth 1 ret) :ref)) + (setq col (current-column)) + (setq indent (make-string col ?\ )) + (insert (format "<%s>" ret)) + (dolist (refspec (cdr value)) + (setq ret (plist-get (nth 1 refspec) :ref)) + (insert (format " ,\n%s<%s>" indent ret))) + nil) (t (insert (format "%S" value)) nil))))