summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2025-02-10 19:32:06 +0100
committerBirte Kristina Friesel <derf@finalrewind.org>2025-02-10 19:32:06 +0100
commit384fc02f87b67ebf90ba586d3490a6abcea13f41 (patch)
tree151361f35bc336ce6ca6579f1e7f260496fc87cc
parente5fe0c99319c28f5fd63440d791b089b702069b1 (diff)
hafas --list: annotate GeoIP-locked services
-rwxr-xr-xbin/hafas19
1 files 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<motlist>
By default, B<hafas> considers all modes of transport for routing. With