summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-03-24 16:51:08 +0100
committerBirte Kristina Friesel <derf@finalrewind.org>2024-03-24 16:51:08 +0100
commit7285e2ed1c9646f9a0042af79f3045892e797375 (patch)
tree3cdc95ee089d6c57f3ffa31aa7df3914968880db /bin
parent05661d3c9c695eb6ec57b1d8fe72e7274289bc27 (diff)
add via_stop support
Diffstat (limited to 'bin')
-rwxr-xr-xbin/hafas12
1 files changed, 9 insertions, 3 deletions
diff --git a/bin/hafas b/bin/hafas
index 0fe463e..ccbd88f 100755
--- a/bin/hafas
+++ b/bin/hafas
@@ -77,15 +77,21 @@ if ($list_services) {
parse_mot_options();
-my ( $from_stop, $to_stop ) = @ARGV;
+my ( $from_stop, $via_stop, $to_stop ) = @ARGV;
-if ( not $from_stop and $to_stop ) {
+if ( $via_stop and not $to_stop ) {
+ $to_stop = $via_stop;
+ $via_stop = undef;
+}
+
+if ( not( $from_stop and $to_stop ) ) {
show_help(1);
}
my %opt = (
service => $service,
from_stop => $from_stop,
+ via_stop => $via_stop,
to_stop => $to_stop,
excluded_mots => \@excluded_mots,
exclusive_mots => \@exclusive_mots,
@@ -450,7 +456,7 @@ hafas - Interface to HAFAS (e.g. Deutsche Bahn) itinerary services
=head1 SYNOPSIS
B<hafas> [B<-d> I<date>] [B<-t> I<time>] [B<-m> I<motlist>]
-[B<-s> I<service>] [B<-l> I<language>] [B<-v>] I<from> I<to>
+[B<-s> I<service>] [B<-l> I<language>] [B<-v>] I<from> [I<via>] I<to>
=head1 VERSION