diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2025-02-10 19:32:06 +0100 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2025-02-10 19:32:06 +0100 |
commit | 384fc02f87b67ebf90ba586d3490a6abcea13f41 (patch) | |
tree | 151361f35bc336ce6ca6579f1e7f260496fc87cc | |
parent | e5fe0c99319c28f5fd63440d791b089b702069b1 (diff) |
hafas --list: annotate GeoIP-locked services
-rwxr-xr-x | bin/hafas | 19 |
1 files changed, 15 insertions, 4 deletions
@@ -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<motlist> By default, B<hafas> considers all modes of transport for routing. With |