Changeset 1969
- Timestamp:
- 12/03/07 14:27:46 (5 months ago)
- Files:
-
- Swishetest/trunk/make_collection (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
Swishetest/trunk/make_collection
r1965 r1969 17 17 my $dict='data/C020-words-txt/words-linux-fc1.txt'; 18 18 19 my $min_words_per_file=1 ;20 my $max_words_per_file=1 ;21 my $num_files= 0; # 0 means one file for each word in dictionary19 my $min_words_per_file=100; 20 my $max_words_per_file=100; 21 my $num_files=1000; # 0 means one file for each word in dictionary 22 22 my $num_words; # should be scalar(@words) 23 23 my $base_dir = ""; # empty base_dir means be an -S prog external program … … 32 32 sub Usage { 33 33 return "make_collection: [--dict=words.txt] [--base_dir=/your/location]\n" . 34 " [--min_words_per_file=#] [--max_words_per_file=#] [--num_files=#]\n" .35 " [--verbose] [--englishify] [--filetype=(txt|html|xml)] [--(no)randommode]\n" .34 " [--min_words_per_file=$min_words_per_file] [--max_words_per_file=$max_words_per_file] [--num_files=$num_files]\n" . 35 " [--verbose] [--englishify] [--filetype=(txt|html|xml)] [--(no)randommode]:\n" . 36 36 " Makes a set of (possibly random) xml, html, or txt files based on a dict.\n"; 37 37 } … … 50 50 "filetype=s" => \$filetype, 51 51 "verbose!" => \$verbose 52 ) || die "$prog: Couldn't parse options:\n" .Usage();52 ) || die Usage(); 53 53 54 54 … … 118 118 print STDERR "$prog: created $path...\n" if ($verbose && $i % 1000 == 0); 119 119 } else { 120 # act like a swish-e external program 120 # act like a swish-e external program. This prints directly to stdout. 121 121 simple_swishe_progify($parser, "$i.$filetype", $doc, scalar(localtime(time()))); 122 122 }
