From b1a2658b5ca2f54e3e378b0bc9a1741a81a10c03 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Tue, 2 Mar 2010 16:30:01 +0100 Subject: Add short options --- bin/efa | 72 ++++++++++++++++++++++++++++++++--------------------------------- 1 file changed, 36 insertions(+), 36 deletions(-) (limited to 'bin') diff --git a/bin/efa b/bin/efa index 3d58063..ebc490d 100755 --- a/bin/efa +++ b/bin/efa @@ -7,7 +7,7 @@ use warnings; use encoding 'utf8'; use 5.010; use Encode; -use Getopt::Long; +use Getopt::Long qw/:config no_ignore_case/; use WWW::Mechanize; my $firsturl = 'http://efa.vrr.de/vrr/XSLT_TRIP_REQUEST2?language=de&itdLPxx_transpCompany=vrr'; @@ -202,28 +202,28 @@ sub show_content { } GetOptions( - 'arrive=s' => \$time_arrive, - 'bike' => \$with_bike, - 'date=s' => \$date, - 'debug' => \$debug, - 'depart=s' => \$time_depart, - 'exclude=s' => \@exclude, - 'from=s{2}' => \@from, - 'from-type=s' => \$from_type, - 'help' => sub {exec('perldoc', '-F', $0)}, - 'ignore-info=s{0,1}' => \$ignore_info, - 'max-change=i' => \$maxinter, - 'post=s' => \%post, - 'prefer=s' => \$prefer, - 'proximity' => \$proximity, - 'include=s' => \$include, - 'time=s' => \$time, - 'to=s{2}' => \@to, - 'to-type=s' => \$to_type, - 'version' => sub {print "efa version $version\n"; exit 0}, - 'via=s{2}' => \@via, - 'via-type=s' => \$via_type, - 'walk-speed=s' => \$walk_speed, + 'a|arrive=s' => \$time_arrive, + 'b|bike' => \$with_bike, + 'd|date=s' => \$date, + 'D|debug' => \$debug, + 'depart=s' => \$time_depart, + 'e|exclude=s' => \@exclude, + 'from=s{2}' => \@from, + 'from-type=s' => \$from_type, + 'h|help' => sub {exec('perldoc', '-F', $0)}, + 'I|ignore-info=s{0,1}' => \$ignore_info, + 'm|max-change=i' => \$maxinter, + 'post=s' => \%post, + 'P|prefer=s' => \$prefer, + 'p|proximity' => \$proximity, + 'i|include=s' => \$include, + 't|time=s' => \$time, + 'to=s{2}' => \@to, + 'to-type=s' => \$to_type, + 'version' => sub {print "efa version $version\n"; exit 0}, + 'via=s{2}' => \@via, + 'via-type=s' => \$via_type, + 'w|walk-speed=s' => \$walk_speed, ); @exclude = split(/,/, join(',', @exclude)); @@ -433,34 +433,34 @@ Possible Is: B (default), B
, B (point of interest) As an alternative to these options, it is possible to specify the I of the to/from/via options as "addr:I" or "poi:I", respectively. -=item B<--time>|B<--depart> I:I +=item B<-t>|B<--time>|B<--depart> I:I Journey start time -=item B<--arrive> I:I +=item B<-a>|B<--arrive> I:I Journey end time (overrides --time/--depart) -=item B<--date> I
.I.[I] +=item B<-d>|B<--date> I
.I.[I] Journey date -=item B<--bike> +=item B<-b>|B<--bike> Choose connections where you can take a bike with you -=item B<--exclude> I +=item B<-e>|B<--exclude> I Exclude I (comma separated list). Possible transports: zug, s-bahn, u-bahn, stadtbahn, tram, stadtbus, regionalbus, schnellbus, seilbahn, schiff, ast, sonstige -=item B<--max-change> I +=item B<-m>|B<--max-change> I Print connections with at most I interchanges -=item B<--prefer> I +=item B<-P>|B<--prefer> I Prefer connections of I: @@ -480,11 +480,11 @@ Prefer connections with less walking (at interchanges) =back -=item B<--proximity> +=item B<-p>|B<--proximity> Take stops close to the stop/start into account and possibly use them instead -=item B<--include> I +=item B<-i>|B<--include> I Include connections using trains of type I, where I may be: @@ -505,18 +505,18 @@ All trains (local + IC + ICE) =back -=item B<--walk-speed> I +=item B<-w>|B<--walk-speed> I Set your walking speed to I. Accepted values: normal (default), fast, slow -=item B<--ignore-info> [ I ] +=item B<-I>|B<--ignore-info> [ I ] Ignore additional information matching I (default: /Fahrradmitnahme/). If I is not supplied, removes the default regex (-E nothing will be ignored) -=item B<--debug> +=item B<-D>|B<--debug> Display debug information (additional post requests sent to the site, raw items received from the site) @@ -529,7 +529,7 @@ C<--post lineRestriction=400> to also show IC and ICE trains. Note that B<--post> will be overridden by the standard efa options, such as B<--time>. -=item B<--version> +=item B<-v>|B<--version> Print version information -- cgit v1.2.3