X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=cwiki-view.el;h=ec3f25677bc3f093c7fd155f4284a3b1917d8b1a;hb=9aa5a94e2d7fb0283c2450962d431d6ce1e51f27;hp=ae8bb22ddef0d5133b692a38940a1a98635fb14e;hpb=f77d94ad5cb5544f0f5249316addb6a5f92cc55f;p=chise%2Fest.git diff --git a/cwiki-view.el b/cwiki-view.el index ae8bb22..ec3f256 100644 --- a/cwiki-view.el +++ b/cwiki-view.el @@ -2,136 +2,205 @@ (require 'cwiki-common) (defvar chise-wiki-view-url "view.cgi") -(defvar chise-wiki-edit-url "edit/edit.cgi") -(defvar chise-wiki-add-url "edit/add.cgi") +(defvar chise-wiki-edit-url "edit.cgi") +(defvar chise-wiki-add-url "add.cgi") -(defun www-char-display-feature-default (char feature-name &optional value - lang uri-char) - (unless value - (setq value (www-char-feature char feature-name))) - (unless uri-char - (setq uri-char (char-to-string char))) - (www-html-display-paragraph - (format "[[%s|%?feature=%s&char=%s]] : %s [[[edit|%s?char=%s&feature=%s]]]" - (www-format-feature-name feature-name lang) - chise-wiki-view-url - (www-uri-encode-feature-name feature-name) - uri-char - (www-format-value value feature-name) - chise-wiki-edit-url - uri-char - (www-uri-encode-feature-name feature-name) - ))) - -(defun www-char-display-feature-as-ucs (char feature-name &optional value) - (unless value - (setq value (www-char-feature char feature-name))) - (www-html-display-paragraph - (format "= [[U+%s|http://www.unicode.org/cgi-bin/GetUnihanData.pl?codepoint=%s]] (%d)" - (www-format-value-as-HEX value) - (www-format-value-as-HEX value) - value))) - -(defun www-display-char-desc (uri-char &optional lang level) +(defun www-display-object-desc (genre uri-object &optional lang level simple) (unless level (setq level 1)) - (let ((char (www-uri-decode-char uri-char)) - feature-name logical-feature displayed-features) - (when (characterp char) - (when (= (length uri-char) 1) - (setq uri-char (www-uri-encode-char char))) + (let ((object (www-uri-decode-object genre uri-object)) + logical-feature chise-wiki-displayed-features + parents + GlyphWiki-id) + (when object + (when (and (eq genre 'character) + (= (length uri-object) 1)) + (setq uri-object (www-uri-encode-object object))) (when (= level 1) (princ (encode-coding-string (format " -CHISE-wiki character: %s +EsT %s = %s \n" - (decode-uri-string uri-char 'utf-8-mcs-er)) + genre + (decode-uri-string uri-object 'utf-8-mcs-er)) 'utf-8-mcs-er)) (princ "\n")) - (princ (format "%s\n" + (when (eq genre 'character) + (dolist (feature (char-feature-property '$object 'additional-features)) + (mount-char-attribute-table + (char-feature-name-at-domain feature '$rev=latest)))) + (princ + (format + (if simple + "
+ + + + +
+
\n" + "
+ + + +
+
\n") + uri-object)) + (when (setq parents (www-get-feature-value object '<-denotational)) + (princ (format "

%s %s

\n
\n" + (www-format-value-as-char-list parents) + (www-format-feature-name '->denotational lang)))) + (when (setq parents (www-get-feature-value object '<-subsumptive)) + (princ (format "

%s %s

\n
\n" + (www-format-value-as-char-list parents) + (www-format-feature-name '->subsumptive lang)))) + (when (eq genre 'character) + (setq GlyphWiki-id (char-GlyphWiki-id object))) + (princ (format "%s%s\n" level - (www-format-encode-string (char-to-string char)) + (www-format-encode-string + (est-format-object object) + ;; (if (eq genre 'character) + ;; (char-to-string object) + ;; (format "%s" (concord-object-id object))) + ) + (if GlyphWiki-id + (format + " \"%s\"" + GlyphWiki-id + GlyphWiki-id GlyphWiki-id) + "") level)) (if (> level 1) (princ "