From c55d1a9c727d06f7eae6dd4628c443b095309447 Mon Sep 17 00:00:00 2001 From: Julian Rojas Date: Sat, 25 Jun 2022 01:29:11 +0200 Subject: [PATCH 1/2] Add differential updates feature based on existing history LevelStore --- bin/gtfsrt2json.js | 2 +- bin/gtfsrt2lc.js | 30 +- lib/GtfsIndex.js | 55 +- lib/Gtfsrt2LC.js | 1645 +++++++++++++++++++++++-------------------- package-lock.json | 1684 +++++++++++++++++++++----------------------- package.json | 6 +- 6 files changed, 1716 insertions(+), 1706 deletions(-) diff --git a/bin/gtfsrt2json.js b/bin/gtfsrt2json.js index 6d8a8bb..1fce163 100755 --- a/bin/gtfsrt2json.js +++ b/bin/gtfsrt2json.js @@ -7,7 +7,7 @@ console.error("GTFS-RT to JSON converter use --help to discover how to use it"); program .option('-r --real-time ', 'URL/path to gtfs-rt feed') - .option('-H --headers ', 'Extra HTTP headers for requesting the gtfs files. E.g., {\\"api-Key\\":\\"someApiKey\\"}') + .option('-H --headers ', 'Extra HTTP headers for requesting the gtfs files. E.g., {\\"some-header\\":\\"some-API-Key\\"}') .parse(process.argv); if (!program.realTime) { diff --git a/bin/gtfsrt2lc.js b/bin/gtfsrt2lc.js index 98739a4..4a465f4 100755 --- a/bin/gtfsrt2lc.js +++ b/bin/gtfsrt2lc.js @@ -3,17 +3,19 @@ const fs = require('fs'); const GtfsIndex = require('../lib/GtfsIndex'); const Gtfsrt2LC = require('../lib/Gtfsrt2LC'); -var program = require('commander'); +const { Level } = require('level'); +const program = require('commander'); program .option('-r --real-time ', 'URL/path to gtfs-rt feed') .option('-s --static ', 'URL/path to static gtfs feed') - .option('-u --uris-template