Skip to content
Browse files

slightly friendlier usage message

  • Loading branch information...
1 parent 05ed33a commit 0fc5796f03e8f50ce83ff5d01334f1b449763dbd @alexfink committed Jan 17, 2012
Showing with 16 additions and 10 deletions.
  1. +16 −10 phonology/gleb.pl
View
26 phonology/gleb.pl
@@ -28,6 +28,7 @@
"version $version";
my $verbose;
+my $show_seed;
my $use_html;
my $CGI;
my $seed = time ^ $$ ^ $$<<15;
@@ -49,25 +50,27 @@ sub die_with_usage {
Usage: $0 [options]
--o <filename> Phonology output file. Defaults to no output. The output is a
- YAML-formatted collection of the data needed to run the
- phonology generator. It's not the human-readable form;
- that comes on standard output.
--O <filename> As above, with a little extra annotation for
- readability, like translations of the internal phone notation.
--i <filename> Input the phonology from the named file, rather than generating
- a new one.
-I Produce a segmental inventory, with frequencies of appearance
in each syllable position.
-d Produce English descriptions of the phonology's rules, etc.
-w N Generate N random words.
-c When generating random words, also compute canonical phonemic
representations, which don't require unnecessary rules.
-h Use HTML.
--p <string> Do some conversions between phone formats. Do nothing else.
+
+-o <filename> Phonology output file. Defaults to no output. The output is a
+ YAML-formatted, not human-friendly, collection of the data
+ needed to run the phonology generator.
+-O <filename> As above, with a little extra annotation for
+ like translations of the internal phone notation.
+ (Still not human-friendly.)
+-i <filename> Input the phonology from the named file, rather than generating
+ a new one.
+
-r N Use N as the random seed.
-v Verbose. Show progress and a few other things.
-D Show some debugging output.
+-p <string> Do some conversions between phone formats. Do nothing else.
USAGE
exit 1;
@@ -104,6 +107,9 @@ sub parse_args {
elsif ($arg eq '-v') {
$verbose = $Phonology::verbose = 1;
}
+ elsif ($arg eq '--showseed') {
+ $show_seed = 1;
+ }
elsif ($arg eq '-w') {
$num_words = shift;
die "-w expects an integer argument\n" if !defined $num_words or ($num_words !~ /^\-?[0-9]+$/);
@@ -180,7 +186,7 @@ END
exit 0;
}
-print STDERR "seed $seed\n" if $verbose;
+print STDERR "seed $seed\n" if $verbose or $show_seed;
srand $seed;
my $pd;

0 comments on commit 0fc5796

Please sign in to comment.
Something went wrong with that request. Please try again.