From 384fc02f87b67ebf90ba586d3490a6abcea13f41 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Mon, 10 Feb 2025 19:32:06 +0100 Subject: hafas --list: annotate GeoIP-locked services --- bin/hafas | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/bin/hafas b/bin/hafas index ce896fb..d7dc9d3 100755 --- a/bin/hafas +++ b/bin/hafas @@ -70,15 +70,22 @@ GetOptions( ) or show_help(1); if ($list_services) { - printf( "%-40s %-14s %s\n\n", 'operator', 'abbr. (-s)', 'languages (-l)' ); + printf( + "%-40s %-14s %-15s %s\n\n", + 'operator', 'abbr. (-s)', 'languages (-l)', + 'time zone' + ); for my $service ( Travel::Routing::DE::HAFAS::get_services() ) { if ( $service->{shortname} eq 'DB' ) { next; } printf( - "%-40s %-14s %s\n", - @{$service}{qw(name shortname)}, - join( q{ }, @{ $service->{languages} // [] } ) + "%-40s%1s %-14s %-15s %s\n", + $service->{name}, + $service->{geoip_lock} ? q{!} : q{ }, + $service->{shortname}, + join( q{ }, @{ $service->{languages} // [] } ), + $service->{time_zone} // q{}, ); } exit 0; @@ -553,6 +560,10 @@ Note that requesting an invalid/unsupported language may lead to garbage output. List known HAFAS installations and exit. Use B<-s>|B<--service> to select an operator from this list for a HAFAS request. +Instances marked with an exclamation mark (C<< ! >>) are behind a GeoIP filter +and may need a proxy to work. See the documentation of get_active_service in +Travel::Status::DE::HAFAS(3pm) for details. + =item B<-m>, B<--mot> I By default, B considers all modes of transport for routing. With -- cgit v1.2.3