Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Travel-Routing-DE-EFA
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
derf
Travel-Routing-DE-EFA
Commits
eec38a67
Commit
eec38a67
authored
10 years ago
by
Birte Kristina Friesel
Browse files
Options
Downloads
Patches
Plain Diff
efa: add -s / --service option
parent
133ccd4b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/efa
+25
-3
25 additions, 3 deletions
bin/efa
with
25 additions
and
3 deletions
bin/efa
+
25
−
3
View file @
eec38a67
...
...
@@ -14,6 +14,7 @@ use Encode qw(decode);
use
Travel::Routing::DE::
EFA
;
use
Exception::
Class
;
use
Getopt::
Long
qw/:config no_ignore_case/
;
use
List::
Util
qw(first)
;
our
$VERSION
=
'
2.07
';
my
$ignore_info
=
'
Fahrradmitnahme
';
...
...
@@ -169,13 +170,14 @@ GetOptions(
full-route|f
help|h
ignore-info|I:s
include|i=s
list|l
maps|M
max-change|m=i
num-connections|n=i
prefer|P=s
proximity|p
includ
e|
i
=s
servic
e|
s
=s
time|t=s
timeout=i
to=s@{2}
...
...
@@ -232,6 +234,20 @@ if ( $opt->{exclude} ) {
$opt
->
{
exclude
}
=
[
split
(
/,/
,
join
(
'
,
',
@
{
$opt
->
{
exclude
}
}
)
)
];
}
if
(
$opt
->
{
service
}
)
{
my
$service
=
first
{
$_
->
{
shortname
}
eq
$opt
->
{
service
}
}
Travel::Routing::DE::EFA::
get_efa_urls
();
if
(
not
$service
)
{
printf
STDERR
(
"
Error: Unknown service '%s'. See 'efa -l' for a
"
.
"
list of supported service names
\n
",
$opt
->
{
service
}
);
exit
1
;
}
$efa_url
=
$service
->
{
url
};
}
if
(
$opt
->
{
discover
}
or
$opt
->
{'
auto-url
'}
)
{
for
my
$service
(
Travel::Routing::DE::EFA::
get_efa_urls
()
)
{
$efa
=
eval
{
...
...
@@ -363,7 +379,8 @@ It sends the specified information to the online form and displays the results.
It also supports other EFA services than L<http://efa.vrr.de>.
B<efa> has a builtin list of EFA entry points which can be used with the
B<-A> and B<-D> options. You can also specify a custom URL using B<-u>.
B<-A> and B<-D> options. You can also specify a custom service using B<-u> I<url>
or B<-s> I<name>.
However, the default EFA service is sufficient in most cases (even ICE
connections all over Germany).
...
...
@@ -435,7 +452,7 @@ these are not always available.
=item B<-l>|B<--list>
List su
dd
orted EFA services wit their URLs (see B<-u>) and abbreviations
List su
pp
orted EFA services wit their URLs (see B<-u>) and abbreviations
(see B<-s>).
=item B<-m>|B<--max-change> I<number>
...
...
@@ -476,6 +493,11 @@ Prefer connections with less walking (at interchanges)
Take stops close to the stop/start into account and possibly use them instead
=item B<-s>|B<--service> I<name>
Shortname of the EFA entry point. See Travel::Routing::DE::EFA(3pm) and
the B<-l> option for a list of services.
=item B<-i>|B<--include> I<type>
Include connections using trains of type I<type>, where I<type> may be:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment