(char-db-dump-shuowen): New function.
authorMORIOKA Tomohiko <tomo.git@chise.org>
Sat, 29 Sep 2018 06:37:24 +0000 (15:37 +0900)
committerMORIOKA Tomohiko <tomo.git@chise.org>
Sat, 29 Sep 2018 06:37:24 +0000 (15:37 +0900)
char-db-dump.el

index 00bf967..81b6413 100644 (file)
                    (expand-file-name "Oracle-Bones.el" directory)))))
 
 ;;;###autoload
+(defun char-db-dump-shuowen (directory)
+  (interactive "DDump Shuowen : ")
+  (let ((coding-system-for-write char-db-file-coding-system)
+       (code 1)
+       chr)
+    (with-temp-buffer
+      (insert (format ";; -*- coding: %s -*-\n"
+                     char-db-file-coding-system))
+      (while (<= code 52101)
+       (when (setq chr (decode-char '=shuowen-jiguge code 'defined-only))
+         (insert-char-data chr))
+       (setq code (1+ code)))
+      (write-region (point-min)(point-max)
+                   (expand-file-name "ShuoWen.el" directory)))))
+
+;;;###autoload
 (defun char-db-dump-ruimoku6 (directory)
   (interactive "DDump ruimoku6 : ")
   (let ((coding-system-for-write char-db-file-coding-system)