From 0fdc2e67f39aa8260b3e7db26543a431fcd10ad7 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 24 Oct 2022 22:20:00 +0200 Subject: bin/hafas-m: remove --url support --- bin/hafas-m | 24 +++--------------------- 1 file 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 @@ -344,9 +334,6 @@ To show them exclusively, set I to I,I,... The I 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 Request arrivals/departures using the API provided by I, 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 - -Request arrivals/departures using the API entry point at I. -Note that B<--mot> will not work when using this opton. - =item B<-V>, B<--version> Show version information. -- cgit v1.2.3