From 032464b99f2e72411b3b52bd85d77f0081c75949 Mon Sep 17 00:00:00 2001 From: MORIOKA Tomohiko Date: Thu, 13 Dec 2018 00:43:49 +0900 Subject: [PATCH] (chise-turtle-uri-encode-ccs-name): Convert `!' into "._cmp_.". (char-db-turtle-insert-metadata): Add code for :references. --- char-db-turtle.el | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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)))) -- 1.7.10.4