diff options
author | Daniel Friesel <derf@finalrewind.org> | 2022-10-24 22:20:00 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2022-10-24 22:20:33 +0200 |
commit | 0fdc2e67f39aa8260b3e7db26543a431fcd10ad7 (patch) | |
tree | fac5cbbf6eef834ffbc0bf4a14f1dcbd16ebfc23 /bin/hafas-m | |
parent | bd863926a07926dccd70f37e3130495b4091ba71 (diff) |
bin/hafas-m: remove --url support
Diffstat (limited to 'bin/hafas-m')
-rwxr-xr-x | bin/hafas-m | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/bin/hafas-m b/bin/hafas-m index dfb5d71..66c2ca2 100755 --- a/bin/hafas-m +++ b/bin/hafas-m @@ -17,7 +17,7 @@ my ( $date, $time ); my $arrivals = 0; my $types = q{}; my $developer_mode; -my ( $list_services, $service, $hafas_url ); +my ( $list_services, $service ); my ( @excluded_mots, @exclusive_mots ); my @output; @@ -34,7 +34,6 @@ GetOptions( 'm|mot=s' => \$types, 's|service=s' => \$service, 't|time=s' => \$time, - 'u|url=s' => \$hafas_url, 'V|version' => \&show_version, 'devmode' => \$developer_mode, 'list' => \$list_services, @@ -58,7 +57,6 @@ my %opt = ( arrivals => $arrivals, developer_mode => $developer_mode, service => $service, - url => $hafas_url, ); if ( $opt{station} =~ m{[|]} ) { @@ -124,16 +122,9 @@ sub parse_mot_options { my $default_yes = 1; - if ( $types and $hafas_url ) { - say STDERR 'The options -u and -m cannot be combined. Discarding -m'; - return; - } - for my $type ( split( qr{,}, $types ) ) { if ( $type eq 'help' or $type eq 'list' or $type eq q{?} ) { - if ( not $hafas_url ) { - $service //= 'DB'; - } + $service //= 'DB'; my $desc = Travel::Status::DE::HAFAS::get_service($service); if ($desc) { my @mots = @{ $desc->{productbits} }; @@ -329,8 +320,7 @@ Date to list departures for. Default: today. =item B<--list> List known HAFAS installations. A HAFAS service from this list can be querie -using B<--service>. Use B<--url> for HAFAS entrypoints not included in the -list (and consider notifying me so I can include them in the next release). +using B<--service>. =item B<-m>, B<--mot> I<motlist> @@ -344,9 +334,6 @@ To show them exclusively, set I<motlist> to I<mot1>,I<mot2>,... The I<mot> types depend on the used service. Use C<< -m help >> to list them. -This option is not available when the HAFAS entrypoint has been specified via -B<--url>. - =item B<-s>, B<--service> I<service> Request arrivals/departures using the API provided by I<service>, defaults @@ -356,11 +343,6 @@ to DB (Deutsche Bahn). See B<--list> for a list of known services. Time to list departures for. Default: now. -=item B<-u>, B<--url> I<url> - -Request arrivals/departures using the API entry point at I<url>. -Note that B<--mot> will not work when using this opton. - =item B<-V>, B<--version> Show version information. |