gtfs
Version:
Import GTFS transit data into SQLite and query routes, stops, times, fares and more
25 lines (23 loc) • 884 B
JavaScript
import { Et as formatStackTrace, Tt as formatError, lt as updateGtfsRealtime, xt as getConfig } from "../src-dE_3s7mh.js";
import yargs from "yargs";
import { hideBin } from "yargs/helpers";
//#region src/bin/gtfsrealtime-update.ts
const argv = yargs(hideBin(process.argv)).usage("Usage: $0 --configPath ./config.json").help().option("c", {
alias: "configPath",
describe: "Path to config file",
type: "string"
}).default("configPath", void 0).parseSync();
const handleError = (error = "Unknown Error") => {
process.stdout.write(`\n${formatError(error)}\n`);
console.error(formatStackTrace(error));
process.exit(1);
};
const setupImport = async () => {
await updateGtfsRealtime(await getConfig({ configPath: argv.configPath }));
process.exit();
};
setupImport().catch(handleError);
//#endregion
export { };
//# sourceMappingURL=gtfsrealtime-update.js.map