X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=www%2Fwww-ids-find.el;h=84c6e9e2bf36ea8b12a76512da05eeae92354389;hb=cc352b35fcb514f38923e67f2b5d8a551f7a264c;hp=cf47c73398122da1062365b4474be29467f2c902;hpb=ab20a93f6ab7459242fbdaea82fba2d4107e977a;p=chise%2Fids.git
diff --git a/www/www-ids-find.el b/www/www-ids-find.el
index cf47c73..84c6e9e 100644
--- a/www/www-ids-find.el
+++ b/www/www-ids-find.el
@@ -15,6 +15,16 @@
(concat dest (substring string i))
coding-system))))
+(defconst www-ids-find-version "0.22.3")
+
+(defvar www-ids-find-ideographic-products-file-name
+ (expand-file-name "ideographic-products"
+ (expand-file-name
+ "feature"
+ (expand-file-name
+ "character"
+ chise-system-db-directory))))
+
(defvar www-ids-find-tang-chars-file-name
"~tomo/projects/chise/ids/www/tang-chars.udd")
@@ -81,7 +91,13 @@
)
(t
(insert "")
(insert str)
(insert "")
@@ -94,13 +110,18 @@
(princ
(or (if (setq ucs (or (char-ucs c)
(encode-char c 'ucs)))
- (format " %s"
- ucs
- (cond ((<= ucs #xFFFF)
- (format "U+%04X" ucs))
- ((<= ucs #x10FFFF)
- (format "U-%08X" ucs))))
+ (format
+ " %s"
+ ucs
+ (cond ((<= ucs #xFFFF)
+ (format "U+%04X" ucs))
+ ((<= ucs #x10FFFF)
+ (format "U-%08X" ucs))))
" ")))
+ (when ucs
+ (princ
+ (format " (link map)"
+ ucs)))
(princ " ")
(when is
(princ
@@ -134,6 +155,54 @@
(princ (encode-coding-string "⇒[唐代拓本]" 'utf-8-jp-er)))
(princ "
\n")))
+(defun www-ids-insert-chars-including-components (components
+ &optional ignored-chars)
+ (let ((products (copy-list (ideographic-products-find components)))
+ is as bs)
+ (dolist (c (cond
+ ((> (length products) 10000)
+ products)
+ ((> (length products) 4096)
+ (sort products
+ (lambda (a b)
+ (< (char-int a)(char-int b))))
+ )
+ ((> (length products) 512)
+ (sort products
+ (lambda (a b)
+ (if (setq as (char-total-strokes a))
+ (if (setq bs (char-total-strokes b))
+ (if (= as bs)
+ (< (char-int a)(char-int b))
+ (< as bs))
+ t)
+ (< (char-int a)(char-int b)))))
+ )
+ (t
+ (sort products
+ (lambda (a b)
+ (if (setq as (char-total-strokes a))
+ (if (setq bs (char-total-strokes b))
+ (if (= as bs)
+ (ideograph-char< a b)
+ (< as bs))
+ t)
+ (ideograph-char< a b))))
+ )))
+ (unless (memq c ignored-chars)
+ (setq is (char-feature c 'ideographic-structure))
+ (princ "
Version ") + (princ www-ids-find-version) + (princ (format-time-string + " (Last-modified: %Y-%m-%d %H:%M:%S)" + (nth 5 + (file-attributes + www-ids-find-ideographic-products-file-name)))) + (princ " +
+Copyright (C) 2005 MORIOKA Tomohiko +
") + (unless (file-newer-than-file-p + www-ids-find-ideographic-products-file-name + (locate-file (car command-line-args) exec-path)) + (princ (encode-coding-string "
+現在、システムの更新作業中です。しばらくお待ちください。 +
CHISE で用いられる実態参照形式(例:&M-00256;)で部品を指定する事もできます。" 'utf-8-jp-er)) + (princ (encode-coding-string " +
+\[Links\] +