From 3c86810a389fb40a6f3b472915a6b6912a77279b Mon Sep 17 00:00:00 2001
From: Jacek Kowalski <Jacek@jacekk.info>
Date: Sat, 22 Jun 2019 20:35:36 +0000
Subject: [PATCH] Sort vehicles by number in "vehicles by type" table

---
 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