summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2020-12-25 20:22:42 +0100
committerDaniel Friesel <derf@finalrewind.org>2020-12-25 20:22:42 +0100
commit084fe3eb9603243753609c4c3742b01bf225e7b6 (patch)
tree01a7fca7ec8afe264e0f2a06e1946dc87bab8337
parent0f9dde3810a3b86e0769e6013a19ccf0faeba0a3 (diff)
add more wagon images
-rw-r--r--lib/DBInfoscreen.pm14
-rw-r--r--share/dbdb_wagen.json138
-rw-r--r--templates/wagen.html.ep13
3 files changed, 112 insertions, 53 deletions
diff --git a/lib/DBInfoscreen.pm b/lib/DBInfoscreen.pm
index a0e027d..915b9fd 100644
--- a/lib/DBInfoscreen.pm
+++ b/lib/DBInfoscreen.pm
@@ -188,9 +188,23 @@ sub startup {
elsif ( $train_type =~ m{ICE [12]} and $wagon_type !~ m{^I} ) {
$ret = substr( $uic, 5, 4 );
}
+ elsif ( $train_type =~ m{ICE 3 Redesign} ) {
+ $ret = '3r_' . substr( $uic, 5, 4 );
+ }
+ elsif ( $train_type =~ m{ICE 3} and substr( $uic, 5, 3 ) eq '406' )
+ {
+ $ret = '3_' . substr( $uic, 5, 4 );
+ }
+ elsif ( $train_type eq 'ICE 3 Velaro' ) {
+ $ret = substr( $uic, 5, 4 );
+ }
elsif ( $train_type =~ m{ICE 4} ) {
$ret = substr( $uic, 4, 5 );
}
+ elsif ( $train_type =~ m{ICE T} and substr( $uic, 5, 3 ) eq '415' )
+ {
+ $ret = substr( $uic, 5, 4 );
+ }
if ( $ret and $self->app->dbdb_wagon->{$ret} ) {
return $ret;
}
diff --git a/share/dbdb_wagen.json b/share/dbdb_wagen.json
index 44ac3ec..6bd8fce 100644
--- a/share/dbdb_wagen.json
+++ b/share/dbdb_wagen.json
@@ -1,47 +1,95 @@
{
-"08120": true,
-"14120": true,
-"18120": true,
-"24120": true,
-"24123": true,
-"24125": true,
-"24128": true,
-"48120": true,
-"58120": true,
-"64120": true,
-"8010": true,
-"8014": true,
-"8018": true,
-"8020": true,
-"8023": true,
-"8026": true,
-"8027": true,
-"8028": true,
-"8029": true,
-"8031": true,
-"8040": true,
-"8050": true,
-"8053": true,
-"8060": true,
-"8063": true,
-"8066": true,
-"x8070": true,
-"8080": true,
-"88120": true,
-"98120": true,
-"xApmmz": true,
-"ARkimbz": true,
-"ARkimmbz": true,
-"Avmmz": true,
-"Avmz": true,
-"Bimmdzf": true,
-"Bpmbz": true,
-"Bpmmbdz": true,
-"Bpmmbdzf": true,
-"Bpmmbz": true,
-"Bpmmdz": true,
-"Bpmmz": true,
-"Bvmmsz": true,
-"Bvmmz": true,
-"xBvmsz": true
+"08120":true,
+"14120":true,
+"18120":true,
+"24120":true,
+"24123":true,
+"24125":true,
+"24128":true,
+"31_4030":true,
+"31_4031":true,
+"31_4032":true,
+"31_4033":true,
+"31_4035":true,
+"31_4036":true,
+"31_4037":true,
+"31_4038":true,
+"32_4030":true,
+"32_4031":true,
+"32_4032":true,
+"32_4033":true,
+"32_4035":true,
+"32_4036":true,
+"32_4037":true,
+"32_4038":true,
+"3_4060":true,
+"3_4061":true,
+"3_4062":true,
+"3_4063":true,
+"3_4065":true,
+"3_4066":true,
+"3_4067":true,
+"3_4068":true,
+"3r_4030":true,
+"3r_4031":true,
+"3r_4032":true,
+"3r_4033":true,
+"3r_4035":true,
+"3r_4036":true,
+"3r_4037":true,
+"3r_4038":true,
+"3r_4060":true,
+"3r_4061":true,
+"3r_4062":true,
+"3r_4063":true,
+"3r_4065":true,
+"3r_4066":true,
+"3r_4067":true,
+"3r_4068":true,
+"4070":true,
+"4071":true,
+"4072":true,
+"4073":true,
+"4075":true,
+"4076":true,
+"4077":true,
+"4078":true,
+"48120":true,
+"58120":true,
+"64120":true,
+"8010":true,
+"8014":true,
+"8018":true,
+"8020":true,
+"8023":true,
+"8026":true,
+"8027":true,
+"8028":true,
+"8029":true,
+"8031":true,
+"8040":true,
+"8050":true,
+"8053":true,
+"8060":true,
+"8063":true,
+"8066":true,
+"8070":true,
+"8080":true,
+"88120":true,
+"98120":true,
+"Apmmz":true,
+"ARkimbz":true,
+"ARkimmbz":true,
+"Avmmz":true,
+"Avmz":true,
+"Bimmdzf":true,
+"Bpmbz":true,
+"Bpmmbdz":true,
+"Bpmmbdzf":true,
+"Bpmmbz":true,
+"Bpmmdz":true,
+"Bpmmz":true,
+"Bvmmsz":true,
+"Bvmmz":true,
+"Bvmsz":true
}
diff --git a/templates/wagen.html.ep b/templates/wagen.html.ep
index 49a7274..26edbf5 100644
--- a/templates/wagen.html.ep
+++ b/templates/wagen.html.ep
@@ -1,15 +1,12 @@
<div class="container">
+ % if ($wref->{s} and $wref->{p} and $wref->{ws}) {
+ <p>
+ <%= $wref->{s} %>: Gleis <%= $wref->{p} %> <%= $wref->{ws} %>
+ </p>
+ % }
<div>
<a href="<%= $wagon_file %>"><img src="<%= $wagon_file %>" style="width: 100%;"></a>
</div>
- <p>
- % if ($wref->{s} and $wref->{p} and $wref->{ws}) {
- Position in <%= $wref->{s} %>: Gleis <%= $wref->{p} %> Abschnitt <%= $wref->{ws} %>
- % }
- % elsif ($wref->{s} and $wref->{p}) {
- <%= $wref->{s} %> Gleis <%= $wref->{p} %>
- % }
- </p>
<p class="copyright">
Abbildung © Seemanngrafik d.i.p. im Auftrag der Deutschen Bahn AG,
lizensiert unter CC-BY-4.0