Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
gtfs-to-pouch
Advanced tools
Readme
Scripts to convert GTFS files to a PouchDB database,
Transit data is commonly stored in the GTFS format. This script can unzip it and store it in PouchDB databases. These can later be queried with query-pouch-gtfs.
function parseGTFS(
inputFile: string | NodeJS.ReadableStream | Buffer,
destinations: string | { [P in keyof DatabaseList]: DatabaseList[P] | string },
): Promise<void>
Parses a GTFS zip file and saves the data into multiple PouchDB databases.
function parseGTFSPartial(
partialFile: string,
destination: string | PouchDB.Database<any>,
): Promise<void>
function parseGTFSPartial(
partialFile: NodeJS.ReadableStream,
partialName: string,
destination: string | PouchDB.Database<any>,
): Promise<void>
Parses a single GTFS partial, rather than the entire ZIP file.
Examples:
gtfs-to-pouch -i gtfs.zip -o ./gtfs-dbs
gtfs-to-pouch --output ./gtfs-dbs < gtfs.zip
gtfs-to-pouch --input ./gtfs-files -o ./gtfs-dbs
gtfs-to-pouch --partial -i ./routes.txt -o ./db/routes
Options:
--partial Switches to partial mode. Allows for parsing a single GTFS text
file, such as routes.txt, rather than the entire ZIP file.
-i, --input Input path pointing to GTFS file or directory.
Can also pipe from stdin.
-n, --name Name of the GTFS partial. Only needed if both in partial mode
and stdin is being used instead of input.
-o, --output Output directory, relative to the current working directory.
Should contain databases, or point to the database in partial mode.
-h, --help Show help text
FAQs
Convert a GTFS schedule into PouchDB databases
The npm package gtfs-to-pouch receives a total of 28 weekly downloads. As such, gtfs-to-pouch popularity was classified as not popular.
We found that gtfs-to-pouch demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.