Loading bin/efa +36 −1 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ my $offset; my (@from, @to, @via); my ($time, $time_depart, $time_arrive); my $date; my $restrict; my $debug = 0; $post{type_origin} = 'stop'; Loading @@ -40,6 +41,7 @@ GetOptions( 'date=s' => \$date, 'debug' => \$debug, 'post=s' => \%post, 'restrict=s' => \$restrict, ); unless (@to == 2 and @from == 2) { Loading Loading @@ -68,6 +70,18 @@ if ($date) { @post{'itdDateDay','itdDateMonth','itdDateYear'} = split(/\./, $date); } if ($restrict) { given ($restrict) { when('local') { $post{lineRestriction} = 403 } when('ic') { $post{lineRestriction} = 401 } when('ice') { $post{lineRestriction} = 400 } when(/\d+/) { $post{lineRestriction} = $restrict } default { print STDERR "--restrict usage: local / ic / ice\n"; } } } $www->get($firsturl); $www->submit_form( form_name => 'jp', Loading Loading @@ -162,7 +176,7 @@ Departure place Arrival place =time B<--via> I<city> I<stop> =item B<--via> I<city> I<stop> Travel via this place Loading @@ -183,6 +197,27 @@ Journey end time (overrides --time/--depart) Journey date =item B<--restrict> I<type> Only accept connections using trains of type I<type>, where I<type> may be: =over =item * local only take local trains ("Verbund-/Nahverkehrslinien"). Slow, but the cheapest method if you're not travelling long distance =item * ic All trains exctep ICE =item * ICE All trains =back =item B<--post> I<key>=I<value> Add I<key> with I<value> to the HTTP POST request sent to the EFA server. Loading provides/zsh/completions/_efa +1 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ arguments=( '(--depart --time)--arrive:time' '(--arrive --time)--depart:time' '--date:date' '--restrict:type:(local ic ice)' '*--post:POST key=value' ) Loading Loading
bin/efa +36 −1 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ my $offset; my (@from, @to, @via); my ($time, $time_depart, $time_arrive); my $date; my $restrict; my $debug = 0; $post{type_origin} = 'stop'; Loading @@ -40,6 +41,7 @@ GetOptions( 'date=s' => \$date, 'debug' => \$debug, 'post=s' => \%post, 'restrict=s' => \$restrict, ); unless (@to == 2 and @from == 2) { Loading Loading @@ -68,6 +70,18 @@ if ($date) { @post{'itdDateDay','itdDateMonth','itdDateYear'} = split(/\./, $date); } if ($restrict) { given ($restrict) { when('local') { $post{lineRestriction} = 403 } when('ic') { $post{lineRestriction} = 401 } when('ice') { $post{lineRestriction} = 400 } when(/\d+/) { $post{lineRestriction} = $restrict } default { print STDERR "--restrict usage: local / ic / ice\n"; } } } $www->get($firsturl); $www->submit_form( form_name => 'jp', Loading Loading @@ -162,7 +176,7 @@ Departure place Arrival place =time B<--via> I<city> I<stop> =item B<--via> I<city> I<stop> Travel via this place Loading @@ -183,6 +197,27 @@ Journey end time (overrides --time/--depart) Journey date =item B<--restrict> I<type> Only accept connections using trains of type I<type>, where I<type> may be: =over =item * local only take local trains ("Verbund-/Nahverkehrslinien"). Slow, but the cheapest method if you're not travelling long distance =item * ic All trains exctep ICE =item * ICE All trains =back =item B<--post> I<key>=I<value> Add I<key> with I<value> to the HTTP POST request sent to the EFA server. Loading
provides/zsh/completions/_efa +1 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ arguments=( '(--depart --time)--arrive:time' '(--arrive --time)--depart:time' '--date:date' '--restrict:type:(local ic ice)' '*--post:POST key=value' ) Loading