(defvar chise-wiki-view-url "view.cgi")
(defvar chise-wiki-edit-url "edit.cgi")
-(require 'cwiki-format)
+(require 'cwiki-edit)
-(defun www-add-display-feature-input-box (char &optional format)
- (unless format
- (setq format 'default))
- (princ
- "<p><input type=\"text\" name=\"feature-name\"
-size=\"32\" maxlength=\"256\" value=\"\">")
- (princ (encode-coding-string " \u2190 " 'utf-8-mcs-er))
- (princ
- (format "%s<input type=\"text\" name=\"%s\"
-size=\"64\" maxlength=\"256\" value=\"\">
-<input type=\"submit\" value=\"set\" /></p>
-"
- (if (or (eq format 'HEX)(eq format 'hex))
- "0x"
- "")
- format))
+;; (defun www-add-display-feature-input-box (char &optional format)
+;; (unless format
+;; (setq format 'default))
+;; (princ
+;; "<p><input type=\"text\" name=\"feature-name\"
+;; size=\"32\" maxlength=\"256\" value=\"\">")
+;; (princ (encode-coding-string " \u2190 " 'utf-8-mcs-er))
+;; (princ
+;; (format "%s<input type=\"text\" name=\"%s\"
+;; size=\"64\" maxlength=\"256\" value=\"\">
+;; <input type=\"submit\" value=\"set\" /></p>
+;; "
+;; (if (or (eq format 'HEX)(eq format 'hex))
+;; "0x"
+;; "")
+;; format))
+;; )
+
+(defun www-add-display-object-desc (genre uri-object &optional lang format)
+ (www-edit-display-object-desc genre uri-object "" lang format)
)
-(defun www-add-display-char-desc (uri-char &optional lang format)
- (when (stringp format)
- (setq format (intern format)))
- (let ((char (www-uri-decode-object 'character uri-char))
- char-spec)
- (when (characterp char)
- (princ
- (format "<head>
-<title>CHISE-wiki character: %s</title>
-</head>\n"
- (encode-coding-string
- (decode-uri-string uri-char 'utf-8-mcs-er)
- 'utf-8-mcs-er)))
- (princ "<body>\n")
- (princ
- (format "<h1>%s</h1>\n"
- (www-format-encode-string (char-to-string char))))
- (princ "<form action=\"set.cgi\" method=\"GET\">\n")
- (princ
- (encode-coding-string
- (format "<p>(char : <input type=\"text\" name=\"char\"
-size=\"30\" maxlength=\"30\" value=\"%s\">)</p>
-"
- (decode-uri-string uri-char 'utf-8-mcs-er))
- 'utf-8-mcs-er))
- (www-add-display-feature-input-box char format)
- (setq char-spec (char-attribute-alist char))
- (dolist (cell (sort char-spec
- (lambda (a b)
- (char-attribute-name< (car a)(car b)))))
- (princ "<p>")
- (princ
- (www-format-eval-list
- (or (char-feature-property (car cell) 'format)
- '((name) " : " (value)))
- char (car cell) lang uri-char))
- (princ "</p>\n"))
- (princ "</form>\n")
- )))
-
(defun www-batch-add ()
(setq terminal-coding-system 'binary)
(condition-case err
(list (decode-uri-string cell 'utf-8-mcs-er))))
(split-string target "&")))
(setq ret (car target))
- (cond ((eq (car ret) 'char)
- (www-add-display-char-desc
- (cdr ret)
+ (cond (t ; (eq (car ret) 'char)
+ (www-add-display-object-desc
+ (car ret)
+ (cdr ret)
lang
(decode-uri-string (cdr (assq 'format target))
'utf-8-mcs-er))