summaryrefslogtreecommitdiff
path: root/bin/efa
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2009-05-23 12:56:54 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2009-05-23 12:56:54 +0200
commit6c653dd2f0d8794ad10c8d938b4e30de40528837 (patch)
tree9f326d46b736640c34f070815ec518b11c133794 /bin/efa
parent10458f5b1956c234b96ac7006886ba7f0be5b9ee (diff)
efa: Fixed generic messages without time
Diffstat (limited to 'bin/efa')
-rwxr-xr-xbin/efa9
1 files changed, 7 insertions, 2 deletions
diff --git a/bin/efa b/bin/efa
index ae562ab..f655805 100755
--- a/bin/efa
+++ b/bin/efa
@@ -67,12 +67,17 @@ sub parse_content($) {
for (my $i = 0; @{$raw->[$offer]} >= (($i+1) * $groupsize); $i++) {
$offset = $i * $groupsize;
undef(@extra);
+ if ($raw->[$offer]->[$offset+2] =~ /^Fußweg/) {
+ # These are generic, which means they don't contain a time
+ splice(@{$raw->[$offer]}, $offset, 0, '');
+ splice(@{$raw->[$offer]}, $offset+4, 0, '');
+ }
if ($raw->[$offer]->[$offset+3] =~ /^Fußweg/) {
- # Fußweg messages lack the last element, so inject it
+ # These messages lack the last element, so inject it
splice(@{$raw->[$offer]}, $offset+7, 0, '');
}
for my $j (0, 4, 8) {
- until (not exists($raw->[$offer]->[$offset+$j]) or $raw->[$offer]->[$offset+$j] =~ /^\d+:\d+$/) {
+ until (not exists($raw->[$offer]->[$offset+$j]) or $raw->[$offer]->[$offset+$j] =~ /^(\d+:\d+)?$/) {
last unless (exists($raw->[$offer]->[$offset+$j]));
last if ($raw->[$offer]->[$offset+$j] eq 'Verspätungen sind berücksichtigt');
if ($raw->[$offer]->[$offset+$j] =~ /^\s*$/) {