summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2014-08-17 16:21:11 +0200
committerDaniel Friesel <derf@finalrewind.org>2014-08-17 16:21:11 +0200
commit133ccd4be051d7ce70219293c6d17eb309425803 (patch)
tree4cd081d9dbb167f277e4f4badbb99589df16587d /bin
parenteae082a2110ec16d630b1a1d0f76fae3366e9632 (diff)
add efa -l / --list option
Diffstat (limited to 'bin')
-rwxr-xr-xbin/efa15
1 files changed, 15 insertions, 0 deletions
diff --git a/bin/efa b/bin/efa
index ee85bf7..eb044d4 100755
--- a/bin/efa
+++ b/bin/efa
@@ -169,6 +169,7 @@ GetOptions(
full-route|f
help|h
ignore-info|I:s
+ list|l
maps|M
max-change|m=i
num-connections|n=i
@@ -184,6 +185,15 @@ GetOptions(
},
) or show_help(1);
#>>>
+
+if ( $opt->{list} ) {
+ printf( "%-40s %-14s %s\n\n", 'service', 'abbr. (efa -s)', 'url (efa -u)' );
+ for my $service ( Travel::Routing::DE::EFA::get_efa_urls() ) {
+ printf( "%-40s %-14s %s\n", @{$service}{qw(name shortname url)} );
+ }
+ exit 0;
+}
+
if ( not( @from and @to ) ) {
if ( @ARGV == 4 ) {
( @from[ 0, 1 ], @to[ 0, 1 ] ) = @ARGV;
@@ -423,6 +433,11 @@ Display duration, ticket class and price for each route (if available)
Display intermediate stops (with time and platform) of each train. Note that
these are not always available.
+=item B<-l>|B<--list>
+
+List suddorted EFA services wit their URLs (see B<-u>) and abbreviations
+(see B<-s>).
+
=item B<-m>|B<--max-change> I<number>
Print connections with at most I<number> interchanges