X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=cwiki-common.el;h=60a93a28b6d124776b8854aedd752312bb61592f;hb=0b7104c6236c019112fa1b4a870589cb987df56a;hp=6e7b01467fc646ef38466b2398911986d8daa734;hpb=037263b4f76fb61dd7835ef61aa921ebe2a895df;p=chise%2Fest.git
diff --git a/cwiki-common.el b/cwiki-common.el
index 6e7b014..60a93a2 100644
--- a/cwiki-common.el
+++ b/cwiki-common.el
@@ -16,6 +16,9 @@
(concord-assign-genre 'era@ruimoku "/usr/local/var/ruimoku/db")
(concord-assign-genre 'period@ruimoku "/usr/local/var/ruimoku/db")
(concord-assign-genre 'journal@ruimoku "/usr/local/var/ruimoku/db")
+(concord-assign-genre 'journal-name@ruimoku "/usr/local/var/ruimoku/db")
+(concord-assign-genre 'publisher@ruimoku "/usr/local/var/ruimoku/db")
+(concord-assign-genre 'publisher-name@ruimoku "/usr/local/var/ruimoku/db")
(mount-char-attribute-table 'instance@ruimoku/bibliography/title)
;; (mount-char-attribute-table 'instance@ruimoku/bibliography/content*note)
@@ -93,7 +96,7 @@
ret)
(let ((type (www-feature-type feature-name)))
(cond ((eq type 'relation)
- 'space-separated-char-list)
+ 'space-separated)
((eq type 'structure)
'space-separated-ids)
((eq type 'stext)
@@ -104,7 +107,8 @@
(= (charset-chars feature-name) 94))
'("0x" (HEX)
" (" (decimal) ") <" (ku-ten) "> " (prev-char) (next-char))
- '("0x" (HEX) " (" (decimal) ") " (prev-char) (next-char))))))
+ '("0x" (HEX) " (" (decimal) ") " (prev-char) (next-char))))
+ 'space-separated))
(defun char-feature-name-at-domain (feature-name domain)
(if domain
@@ -287,6 +291,7 @@
(defun www-uri-decode-feature-name (uri-feature)
(let (feature)
+ (setq uri-feature (decode-uri-string uri-feature 'utf-8-mcs-er))
(cond
((string-match "^from\\." uri-feature)
(intern (format "<-%s" (substring uri-feature (match-end 0))))
@@ -310,6 +315,9 @@
?>)
(substring uri-feature (match-end 0))))
)
+ ((string-match "^o\\." uri-feature)
+ (intern (format "=+>%s" (substring uri-feature (match-end 0))))
+ )
((string-match "^a\\." uri-feature)
(intern (format "=>%s" (substring uri-feature (match-end 0))))
)
@@ -337,6 +345,9 @@
(defun www-uri-encode-feature-name (feature-name)
(setq feature-name (symbol-name feature-name))
(cond
+ ((string-match "^=\\+>\\([^=>]+\\)" feature-name)
+ (concat "o." (substring feature-name (match-beginning 1)))
+ )
((string-match "^=\\([^=>]+\\)" feature-name)
(concat "rep." (substring feature-name (match-beginning 1)))
)
@@ -428,8 +439,11 @@
=daikanwa
=gt =gt-k
=>>jis-x0208 =>>jis-x0213-1
+ =+>jis-x0208@1978
=>jis-x0208 =>jis-x0213-1
=>>gt
+ =>ucs@iso =>ucs@unicode
+ =>ucs@jis =>ucs@cns =>ucs@ks
=ruimoku-v6
=big5
=big5-cdp))
@@ -452,10 +466,15 @@
))))
(format "rep.id:%s" (concord-object-id object))))
-(defun est-format-object (object)
+(defun est-format-object (object &optional readable)
(if (characterp object)
(char-to-string object)
- (format "%s" (concord-object-id object))))
+ (let ((ret (or (if readable
+ (or (concord-object-get object 'name)
+ (concord-object-get object '=name)
+ (concord-object-get object 'title)))
+ (concord-object-id object))))
+ (format "%s" ret))))
(defun www-uri-make-object-url (object &optional uri-object)
(format "%s?%s=%s"
@@ -617,9 +636,9 @@ style=\"%s\">"
t 'literal))
(goto-char (point-min))
- (while (re-search-forward "&J\\(78\\|83\\|90\\|97\\|SP\\)-\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]\\);" nil t)
- (setq plane (match-string 1)
- code (string-to-int (match-string 2) 16))
+ (while (re-search-forward "&\\(o-\\)?J\\(78\\|83\\|90\\|97\\|SP\\)-\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]\\);" nil t)
+ (setq plane (match-string 2)
+ code (string-to-int (match-string 3) 16))
(replace-match
(format ""
@@ -680,7 +699,7 @@ style=\"vertical-align:middle\">"
t 'literal))
(goto-char (point-min))
- (while (re-search-forward "&\\(G-\\)?GT-\\([0-9]+\\);" nil t)
+ (while (re-search-forward "&\\(G-\\|g2-\\)?GT-\\([0-9]+\\);" nil t)
(setq code (string-to-int (match-string 2)))
(replace-match
(format ""
t 'literal))
(goto-char (point-min))
- (while (re-search-forward "&\\(UU\\+\\|U-\\)\\([0-9A-F]+\\);" nil t)
- (setq code (string-to-int (match-string 2) 16))
+ (while (re-search-forward "&\\(A-\\)?\\(UU\\+\\|U-\\)\\([0-9A-F]+\\);" nil t)
+ (setq code (string-to-int (match-string 3) 16))
(replace-match
(format ""