EFA(1p)

πŸ“¦
version 2.24 Β· 3 versions
, in debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ¦‹ 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 stop to be an address or a "point of interest", you can set it to 'addr:something' or 'poi:something'. iconic.
  • -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 cause efa to 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-info default. it's useful when --bike didn't return any routes even though most of the route has bike support. 🚲
  • -d|--date dd.mm.[yyyy] β€” journey date. also accepts the shortcut tomorrow. πŸ—“οΈ
  • -D|--discover β€” probe all known EFA entry points for the specified connection. no routes are returned in this case. instead, efa will 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. see Travel::Routing::DE::EFA(3pm) and the -l option 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
  • -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 distance
    • ic β€” local trains + IC
    • ice β€” 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 better
    • nowait β€” prefer connections with less interchanges
    • nowalk β€” 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. see Travel::Routing::DE::EFA(3pm) and the -l option 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 causes efa to display additional accessibility information for each route part (where available). when -x w or -x l do not return any connections, using -x i might 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 message
  • 2 β€” network error, unable to send request
  • 3 β€” EFA did not return any parsable data
  • 4 β€” EFA error: ambiguous input
  • 5 β€” EFA error: no connections found
  • 10 β€” unknown Travel::Routing::DE::EFA error
  • 255 β€” 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::Accessor
  • Exception::Class
  • LWP::UserAgent
  • XML::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-argument efa invocation, read the time, then use efa -t time via via to to to to 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