EFA(1p)
π¦ NAME π¦
okay bestie, meet efa β a command line client for EFA-based public transit routing services. she's a section 1p user-contributed Perl doc and she is so good at finding you a train. π
π SYNOPSIS π
efa --from city stop --to city stop [ additional options ]
efa [ options ] from-city from-stop [ via-city via-stop ] to-city to-stop
π VERSION π
version 2.24 β that's her era, no notes. π₯
πΈ DESCRIPTION πΈ
so basically, efa is a command line client for EFA-based public transit routing interfaces, e.g. <http://efa.vrr.de>. she asks for connections between two points and then shows you the results. literally that's it, that's the whole job. π«Ά
by default she uses the EFA service at <http://efa.vrr.de> (operated by Verkehrsverbund Rhein-Ruhr), which covers most places in Germany. you can grab a list of all supported EFA instances with -l, and pick a custom instance with either -s service or -u url. and get this β you can also probe all the known EFA services for one specific connection using the -A and -D options. main character behaviour fr fr. β¨
if it's available, efa also shows you the expected occupancy of each route part. it goes from "[ ]" (low occupancy) all the way up to "[!!]" (very high occupancy). ngl, the occupancy data appears to be limited to certain VRR trains at the moment. π
β¨ OPTIONS β¨
--from city stopβ π where you're departing from--to city stopβ π― where you're arriving--via city stopβ π€οΈ travel via this place- in all of these cases, if you want
stopto be an address or a "point of interest", you can set it to'addr:something'or'poi:something'. iconic.
- in all of these cases, if you want
-a|--arrive hh:mmβ journey end time (this overrides--time/--depart)-A|--auto-url|--discover-and-printβ probe all known EFA entry points for the specified connection, and print the first result that wasn't an error.
heads up bestie: this may take a while and will not necessarily return the best result. also, using this option by default is not recommended, because it puts EFA services under considerable additional load. be nice to the servers. π
-b|--bikeβ request connections that let the passenger bring a bike with them. note that this may causeefato display no routes at all β in that case, the backend was unable to find such connections or didn't know about their bike-support. π-B|--bike-infoβ show information about bike support, but do not select routes based on it. essentially this option just changes the--ignore-infodefault. it's useful when--bikedidn't return any routes even though most of the route has bike support. π²-d|--date dd.mm.[yyyy]β journey date. also accepts the shortcuttomorrow. ποΈ-D|--discoverβ probe all known EFA entry points for the specified connection. no routes are returned in this case. instead,efawill print the URLs and names of all entry points which did not return an error. π-u|--efa-url urlβ URL to the EFA entry point, defaults to <https://app.vrr.de/vrrstd/XML_TRIP_REQUEST2>. depending on your location, some urls may contain more specific data than others. seeTravel::Routing::DE::EFA(3pm)and the-loption for alternatives.-e|--exclude transportsβ exclude transports (comma separated list).- possible transports:
zug,s-bahn,u-bahn,stadtbahn,tram,stadtbus,regionalbus,schnellbus,seilbahn,schiff,ast,sonstige
- possible transports:
-E|--extended-infoβ display more than just the basic route information. at the moment, the following is displayed (if available):- route duration
- ticket fare
- transfer duration and elevation changes (via stairs / escalators) at each stop
-f|--full-routeβ display intermediate stops (with time and platform) of each train. note that these are not always available. π-I|--ignore-info [ regex ]β ignore additional information matching regex (default:/Fahrradmitnahme|Einstiegshilfe/)- if regex is not supplied, it removes the default regex (-> nothing will be ignored)
-i|--include typeβ include connections using trains of type type, where type may be:local(default) β only take local trains ("Verbund-/Nahverkehrslinien"). slow, but the cheapest method if you're not traveling long distanceicβ local trains + ICiceβ all trains (local + IC + ICE)
-l|--listβ list supported EFA services with their URLs (see-u) and abbreviations (see-s). π-M|--mapsβ output links to maps of transfer paths and transfer stations where available. πΊοΈ-m|--max-change numberβ print connections with at most number interchanges-n|--num-connections numberβ return up to number connections. if unset, the default of the respective EFA server is used (usually 4 or 5).-P|--prefer typeβ prefer connections of type:speed(default) β the faster, the betternowaitβ prefer connections with less interchangesnowalkβ prefer connections with less walking (at interchanges)
-p|--proximity [minutes]β take stops close to the stop/start into account. by default, up to 10 minutes of walking to/from the route's first/last stop is considered acceptable. you can specify minutes to use a custom value. πΆ-s|--service nameβ shortname of the EFA entry point. seeTravel::Routing::DE::EFA(3pm)and the-loption for a list of services.-t|--time|--depart hh:mmβ journey start time β°--timeout secondsβ set timeout for HTTP requests. default: 60 seconds.-v|--versionβ print version information-w|--walk-speed speedβ set your walking speed to speed. accepted values:normal(default),fast,slow-x|--accessibility typesβ request connections satisfying all of the specified accessibility types (comma-separated list, option may be repeated). please note that this may cause the backend to return no results at all, either because no such connection exists or because the required lines do not have the correct accessibility attributes set. π- the following types are supported:
e/no-escalatorsβ transfers must be possible without taking an escalator.E/no-elevatorsβ transfers must be possible without using an elevator.i/infoβ does not restrict the requested connections. however, this option causesefato display additional accessibility information for each route part (where available). when-x wor-x ldo not return any connections, using-x imight be more helpful (though it cannot guarantee that any of the results satisfy the respective type).l/nf/low-platformβ all vehicles must be low-platform ("Niederflur").s/no-stairsβ transfers must be possible without stairs (e.g. via escalators/elevators or ramps).w/wheelchairβ all vehicles must be wheelchair accessible.
π EXIT STATUS π
0β everything went well π1β invalid arguments, see error message2β network error, unable to send request3β EFA did not return any parsable data4β EFA error: ambiguous input5β EFA error: no connections found10β unknownTravel::Routing::DE::EFAerror255β other internal error
π CONFIGURATION π
None. literally nothing to configure, she's low maintenance bestie. π
β EXAMPLES β
efa Do Hbf MH Hbf
efa Do Hbf MH Hbf
look up a connection from Dortmund (Do) Hbf to Muelheim (MH) Hbf
efa --include ice Essen Hbf Hamburg Dammtor
efa --include ice Essen Hbf Hamburg Dammtor
look up a connection with long-distance trains
efa --arrive 18:00 -e zug,s-bahn -M E Wickenburgstr D Oststr
efa --arrive 18:00 -e zug,s-bahn -M E Wickenburgstr D Oststr
look up a connection from Essen Wickenburgstr to Duesseldorf Oststr. do not use any trains, make sure to arrive around 18:00, and print links to maps of all interchange stations.
efa -s vvs Stuttgart Hbf Stuttgart Marienplatz
efa -s vvs Stuttgart Hbf Stuttgart Marienplatz
use the VVS (Verkehrsverbund Stuttgart) EFA service to look up a connection.
π§ DEPENDENCIES π§
this script requires perl 5.10 (or higher) with the following modules:
Class::AccessorException::ClassLWP::UserAgentXML::LibXML
π BUGS AND LIMITATIONS π
the EFA backend is not able to calculate "two-way" routes, i.e. from -> via -> to routes where from == to. if from and to are the same stop, it doesn't even try to calculate a route ("we recommend walking instead"), and if they are close to each other it may or may not work. π
workaround: request from -> via using the normal four-argumentefainvocation, read the time, then useefa -t time via via to to toto request via -> to.
π AUTHOR π
Copyright (C) 2009-2023 by Birte Kristina Friesel <derf@finalrewind.org>
π LICENSE π
this program is licensed under the same terms as Perl itself.
and that's the whole page bestie!! this one came from the perl v5.36.0 docs, dated 2023-11-27, and it lives at EFA(1p) β go forth and route your little heart out π¦β¨π
π¦ where this page comes from
- debian trixie: libtravel-routing-de-vrr-perl 2.24-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libtravel-routing-de-vrr-perl 2.24-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libtravel-routing-de-vrr-perl 2.24-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libtravel-routing-de-vrr-perl 2.24-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms