Skip to content
Snippets Groups Projects
Commit 57b51d5c authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Added --via (→ --from some place --to other place via teh place)

parent 06a005c8
No related branches found
No related tags found
No related merge requests found
...@@ -22,8 +22,7 @@ my $raw; ...@@ -22,8 +22,7 @@ my $raw;
my $cons; my $cons;
my $groupsize = 8; my $groupsize = 8;
my $offset; my $offset;
my @from; my (@from, @to, @via);
my @to;
my ($time, $time_for); my ($time, $time_for);
my $date; my $date;
my $debug = 0; my $debug = 0;
...@@ -34,6 +33,7 @@ $post{type_destination} = 'stop'; ...@@ -34,6 +33,7 @@ $post{type_destination} = 'stop';
GetOptions( GetOptions(
'from=s{2}' => \@from, 'from=s{2}' => \@from,
'to=s{2}' => \@to, 'to=s{2}' => \@to,
'via=s{2}' => \@via,
'time=s' => \$time, 'time=s' => \$time,
'date=s' => \$date, 'date=s' => \$date,
'debug' => \$debug, 'debug' => \$debug,
...@@ -48,6 +48,9 @@ unless (@to == 2 and @from == 2) { ...@@ -48,6 +48,9 @@ unless (@to == 2 and @from == 2) {
@post{'place_origin','name_origin'} = @from; @post{'place_origin','name_origin'} = @from;
@post{'place_destination','name_destination'} = @to; @post{'place_destination','name_destination'} = @to;
if (@via == 2) {
@post{'place_via','name_via'} = @via;
}
if ($time) { if ($time) {
@post{'itdTimeHour','itdTimeMinute'} = split(/:/, $time); @post{'itdTimeHour','itdTimeMinute'} = split(/:/, $time);
...@@ -156,6 +159,10 @@ Departure place ...@@ -156,6 +159,10 @@ Departure place
Arrival place Arrival place
=time B<--via> I<city> I<stop>
Travel via this place
=item B<--debug> =item B<--debug>
Display debug information (additional post requests sent to the site, Display debug information (additional post requests sent to the site,
......
...@@ -4,6 +4,7 @@ typeset -a arguments ...@@ -4,6 +4,7 @@ typeset -a arguments
arguments=( arguments=(
'--from:city: :stop: ' '--from:city: :stop: '
'--to:city: :stop: ' '--to:city: :stop: '
'--via:city: :stop: '
'--debug' '--debug'
'--time:time' '--time:time'
'--time-for:event:(arrival departure)' '--time-for:event:(arrival departure)'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment