diff options
author | Tomaz Solc <tomaz.solc@tablix.org> | 2014-06-16 10:36:20 +0200 |
---|---|---|
committer | Tomaz Solc <tomaz.solc@tablix.org> | 2014-06-16 10:36:20 +0200 |
commit | 0ecf0722edb04fafda4192893a9f4c6a2ea8a29e (patch) | |
tree | d4997c346fe8483442620576ae5b017acd4c6661 /perl2python.pl | |
parent | da1a92a978878e0af5f1e9fb1a169bf45b098833 (diff) | |
download | unidecode-0ecf0722edb04fafda4192893a9f4c6a2ea8a29e.tar.gz |
Python files have 3 digits in the name now.
Diffstat (limited to 'perl2python.pl')
-rw-r--r-- | perl2python.pl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/perl2python.pl b/perl2python.pl index 98a2963..34438f9 100644 --- a/perl2python.pl +++ b/perl2python.pl @@ -1,3 +1,6 @@ +# usage: +# +# perl perl2python.pl --input=Text-Unidecode-1.00_01/lib/Text/Unidecode --output unidecode use Getopt::Long; my $input = "."; @@ -21,6 +24,7 @@ sub python_escape { # print "$input\n"; push(@INC, $input); +mkdir $output; my $n; for($n = 0; $n < 256; $n++) { @@ -31,7 +35,7 @@ for($n = 0; $n < 256; $n++) { # print "$n\n"; - open(PYTHON, sprintf(">%s/x%02x.py", $output, $n)); + open(PYTHON, sprintf(">%s/x%03x.py", $output, $n)); print PYTHON "data = (\n"; my $m = 0; |