gtfs
Version:
Import GTFS transit data into SQLite and query routes, stops, times, fares and more
28 lines (26 loc) • 875 B
JavaScript
import { Et as formatStackTrace, Tt as formatError, st as exportGtfs, xt as getConfig } from "../src-dE_3s7mh.js";
import yargs from "yargs";
import { hideBin } from "yargs/helpers";
//#region src/bin/gtfs-export.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"
}).option("sqlitePath", {
describe: "Path to SQLite database",
type: "string"
}).parseSync();
const handleError = (error = "Unknown Error") => {
process.stdout.write(`\n${formatError(error)}\n`);
console.error(formatStackTrace(error));
process.exit(1);
};
const setupExport = async () => {
await exportGtfs(await getConfig(argv));
process.exit();
};
setupExport().catch(handleError);
//#endregion
export { };
//# sourceMappingURL=gtfs-export.js.map