NAME

hafas - Interface to HAFAS (e.g. Deutsche Bahn) itinerary services

SYNOPSIS

hafas [-d date] [-t time] [-m motlist] [-s service] [-l language] [-v] from to

VERSION

version 0.02

DESCRIPTION

hafas is a command line client for HAFAS-based public transit itinerary services, e.g. the one operated by Deutsche Bahn. It requests connections between two stops and prints the results.

OPTIONS

-d, --date dd.mm.[yyyy]

Planned departure (or arrival) date. Default: today.

-l, --language language

Request free-text messages to be provided in language. See --list for a list of languages supported by individual HAFAS instances. Note that requesting an invalid/unsupported language may lead to garbage output.

--list

List known HAFAS installations and exit. Use -s|--service to select an operator from this list for a HAFAS request.

-m, --mot motlist

By default, hafas considers all modes of transport for routing. 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

Use the API provided by service for routing; defaults to DB (Deutsche Bahn). See --list for a list of known services.

-t, --time hh:mm

Planned departure (or arrival) time. Default: now.

-v, --verbose

Show more HAFAS messages, e.g. related to construction sites or Wi-Fi availability. Repeating -v increases the verbosity. The level, and thus number of different message types that hafas displays, ranges from 0 (no -v) to 3 (-vvv).

-V, --version

Show version information and exit.

EXIT STATUS

0 upon success, 1 upon internal error, 2 upon backend error.

CONFIGURATION

None.

DEPENDENCIES

* DateTime(3pm)
* Encode(3pm)
* JSON(3pm)
* List::MoreUtils(3pm)
* Travel::Routing::DE::HAFAS(3pm)
* Travel::Status::DE::HAFAS(3pm)

BUGS AND LIMITATIONS

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

AUTHOR

Copyright (C) 2023 by Birte Kristina Friesel <derf@finalrewind.org>

LICENSE

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