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
7720f8af
Commit
7720f8af
authored
16 years ago
by
Birte Kristina Friesel
Browse files
Options
Downloads
Patches
Plain Diff
Added --restrict option for line selection (e.g. use ICE lines, too)
parent
2f900d26
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bin/efa
+36
-1
36 additions, 1 deletion
bin/efa
provides/zsh/completions/_efa
+1
-0
1 addition, 0 deletions
provides/zsh/completions/_efa
with
37 additions
and
1 deletion
bin/efa
+
36
−
1
View file @
7720f8af
...
...
@@ -25,6 +25,7 @@ my $offset;
my
(
@from
,
@to
,
@via
);
my
(
$time
,
$time_depart
,
$time_arrive
);
my
$date
;
my
$restrict
;
my
$debug
=
0
;
$post
{
type_origin
}
=
'
stop
';
...
...
@@ -40,6 +41,7 @@ GetOptions(
'
date=s
'
=>
\
$date
,
'
debug
'
=>
\
$debug
,
'
post=s
'
=>
\
%post
,
'
restrict=s
'
=>
\
$restrict
,
);
unless
(
@to
==
2
and
@from
==
2
)
{
...
...
@@ -68,6 +70,18 @@ if ($date) {
@post
{'
itdDateDay
','
itdDateMonth
','
itdDateYear
'}
=
split
(
/\./
,
$date
);
}
if
(
$restrict
)
{
given
(
$restrict
)
{
when
('
local
')
{
$post
{
lineRestriction
}
=
403
}
when
('
ic
')
{
$post
{
lineRestriction
}
=
401
}
when
('
ice
')
{
$post
{
lineRestriction
}
=
400
}
when
(
/\d+/
)
{
$post
{
lineRestriction
}
=
$restrict
}
default
{
print
STDERR
"
--restrict usage: local / ic / ice
\n
";
}
}
}
$www
->
get
(
$firsturl
);
$www
->
submit_form
(
form_name
=>
'
jp
',
...
...
@@ -162,7 +176,7 @@ Departure place
Arrival place
=
time
B<--via> I<city> I<stop>
=
item
B<--via> I<city> I<stop>
Travel via this place
...
...
@@ -183,6 +197,27 @@ Journey end time (overrides --time/--depart)
Journey date
=item B<--restrict> I<type>
Only accept connections using trains of type I<type>, where I<type> may be:
=over
=item * local
only take local trains ("Verbund-/Nahverkehrslinien"). Slow, but the cheapest
method if you're not travelling long distance
=item * ic
All trains exctep ICE
=item * ICE
All trains
=back
=item B<--post> I<key>=I<value>
Add I<key> with I<value> to the HTTP POST request sent to the EFA server.
...
...
This diff is collapsed.
Click to expand it.
provides/zsh/completions/_efa
+
1
−
0
View file @
7720f8af
...
...
@@ -10,6 +10,7 @@ arguments=(
'(--depart --time)--arrive:time'
'(--arrive --time)--depart:time'
'--date:date'
'--restrict:type:(local ic ice)'
'*--post:POST key=value'
)
...
...
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