The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

hafas-m - Interface to the DeutscheBahn/HAFAS online departure monitor

SYNOPSIS

hafas-m [-d date] [-t time] [-m motlist] [-s service | -u url] station

VERSION

version 2.01

DESCRIPTION

hafas-m is an interface to HAFAS-based departure monitors, for instance the one available at http://reiseauskunft.bahn.de/bin/bhftafel.exe/dn.

It requests all departures at station (optionally filtered by date, time, route and means of transport) and lists them on stdout, similar to the big departure screens installed at most main stations.

OPTIONS

-a, --arrivals

Show arrivals instead of departures, including trains ending at the specified station. Note that this causes the output to display the start instead of the end station.

-d, --date dd.mm.yyyy

Date to list departures for. Default: today.

-l, --lang d|e|i|n

Set language used for additional information. Supports deutsch (default), english, italian and dutch (n), depending on the used service.

-L, --ignore-late

Do not display delayed trains.

--list

List known HAFAS installations. See also --service and --url.

-m, --mot motlist

By default, hafas-m shows all modes of transport arriving/departing at the specified station. With motlist, it is possible to either exclude a list of modes, or exclusively show only a select list of modes.

To exclude modes, set motlist to !mot1,!mot2,...

To show them exclusively, set motlist to mot1,mot2,...

The mot types depend on the used service. Use -m help to list them.

-s, --service service

Request arrivals/departures using the API provided by service, defaults to DB (Deutsche Bahn). See --list for a list of known services.

-t, --time hh:mm

Time to list departures for. Default: now.

-u, --url url

Request arrivals/departures using the API entry point at url, defaults to http://reiseauskunft.bahn.de/bin/bhftafel.exe. Note that the language and output selection suffix (e.g. "/dn") must not be included here.

Again, see --list for a list of known URLs. Unknown URLs are also supported, though note that --mot will not work when using this opton.

-V, --version

Show version information.

EXIT STATUS

Zero unless things went wrong.

CONFIGURATION

None.

DEPENDENCIES

  • Class::Accessor(3pm)

  • LWP::UserAgent(3pm)

  • XML::LibXML(3pm)

BUGS AND LIMITATIONS

The non-default services (anything other than DB) are not well tested.

AUTHOR

Copyright (C) 2015 by Daniel Friesel <derf@finalrewind.org>

LICENSE

This program is licensed under the same terms as Perl itself.