From 26d6f8dbf6c11085c519c85bdd5d4c007fdb5d28 Mon Sep 17 00:00:00 2001 From: imiyazaki Date: Sat, 22 Feb 2003 07:11:17 +0000 Subject: [PATCH] removed. --- Chise_utils/sample.pl | 92 ------------------------------------------------- 1 file changed, 92 deletions(-) delete mode 100644 Chise_utils/sample.pl diff --git a/Chise_utils/sample.pl b/Chise_utils/sample.pl deleted file mode 100644 index 27d5cf5..0000000 --- a/Chise_utils/sample.pl +++ /dev/null @@ -1,92 +0,0 @@ -#!/usr/bin/perl -w - -use Getopt::Long; -use strict; -use vars qw($atr $value $char - $opt_map $opt_mapfrom $opt_mapto - $opt_atr $opt_allatr $opt_showatr - $opt_query - $opt_help - ); -use Chise_utils ':all'; - -my $usage=< | --map | - --mapfrom | - --mapto | - -q | - --show-attribute | - -h | --help | - -a= | - -aa ] - -q - ex. of - total-strokes==8 means - the attribute of total-strokes exactly matches to 8. - ids-parts=~矢 means - the attribute of ids-parts contains the string 矢. - total-strokes==8,ids-parts=~矢 means both at the same time. - -a get of - -aa get all attributes of -EOF - -&GetOptions("mapto=s"=>\$opt_mapto, - "mapfrom=s"=>\$opt_mapfrom, - "m=s"=>\$opt_map, - "a=s"=>\$opt_atr, - "aa"=>\$opt_allatr, - "show-attribute"=>\$opt_showatr, - "q"=>\$opt_query, - "help",\$opt_help, - "h",\$opt_help); - -if($opt_help - or !((($opt_map or $opt_mapfrom or $opt_mapto) and @ARGV==0) - or($opt_showatr and @ARGV==0) - or @ARGV==1 - ) - ){ - print $usage; - exit 1; -}else{ - $char=shift or $char=""; -} - -if($opt_mapfrom){ - $opt_map="<=".$opt_mapfrom; -}elsif($opt_mapto){ - $opt_map="=>".$opt_mapto; -} - -if($opt_map){ - if(defined(%{$chardb{$opt_map}})){ - foreach $char (sort keys %{$chardb{$opt_map}}){ - if($chardb{$opt_map}->{$char}){ - print $char,"\t",$chardb{$opt_map}->{$char},"\n"; - } - } - }else{ - print STDERR "No map for $opt_map.\n"; - } -}elsif($opt_allatr){ - $char=&de_er($char) if($char=~/\d/); - print $char,"\n"; - foreach $atr (sort keys %db){ - if($chardb{$atr}->{"?$char"}){ - print " ",$atr,":",$chardb{$atr}->{"?$char"},"\n"; - } - } -}elsif($opt_atr){ - $char=&de_er($char) if($char=~/\d/); - print $char,"\n"; - print " ",$opt_atr,":",&get_char_attribute($char,$opt_atr),"\n"; -}elsif($opt_showatr){ - foreach $atr (sort keys %db){ - print $atr,"\n"; - } -}elsif($opt_query){ - my $query=$char; - print join "\n",&get_chars_for($query),"\n"; -} - -exit 0; -- 1.7.10.4