From f6f79198b6467435fd7caccd2067eb0a29c97787 Mon Sep 17 00:00:00 2001
From: Jacek Kowalski <Jacek@jacekk.info>
Date: Fri, 21 Jun 2019 22:58:16 +0000
Subject: [PATCH] Move mapping creation to a function in lib/output.php
---
config.php | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/config.php b/config.php
index 2982b7e..d419565 100644
--- a/config.php
+++ b/config.php
@@ -7,7 +7,9 @@
'ttss_file' => 'vehicles_A.json',
'database' => 'mapping_A.sqlite3',
'result' => 'mapping_A.json',
+ 'result_vehicles' => 'vehicles_A.html',
'mapper' => 'numToTypeB',
+ 'prefix' => 'b',
],
'tram' => [
'gtfsrt' => 'ftp://ztp.krakow.pl/VehiclePositions_T.pb',
@@ -16,7 +18,9 @@
'ttss_file' => 'vehicles_T.json',
'database' => 'mapping_T.sqlite3',
'result' => 'mapping_T.json',
+ 'result_vehicles' => 'vehicles_T.html',
'mapper' => 'numToTypeT',
+ 'prefix' => 't',
],
'tram2' => [
'gtfsrt' => 'ftp://ztp.krakow.pl/VehiclePositions.pb',
@@ -25,14 +29,18 @@
'ttss_file' => 'vehicles_T.json',
'database' => 'mapping_T.sqlite3',
'result' => 'mapping_T.json',
+ 'result_vehicles' => 'vehicles_T.html',
'mapper' => 'numToTypeT',
+ 'prefix' => 't',
],
];
foreach($sources as $name => &$source) {
- foreach(['gtfsrt_file', 'ttss_file', 'database', 'result'] as $field) {
+ foreach(['gtfsrt_file', 'ttss_file', 'database', 'result', 'result_vehicles'] as $field) {
$source[$field] = __DIR__.'/data/'.$source[$field];
}
+
$source['result_temp'] = $source['result'].'.tmp';
+ $source['result_vehicles_temp'] = $source['result_vehicles'].'.tmp';
}
unset($source);
--
Gitblit v1.9.1