This repo is to verify that a given list of feeds is listed in feed aggregators. Currently it checks transit.land and transitfeeds.com to verify that feeds are listed in an aggregator.
pip install gtfs-aggregator-checker
The following env variables can be set in a .env file, set to the environment,
or inline like TRANSITLAND_API_KEY=SECRET python -m gtfs_aggregator_checker.
-
TRANSITLAND_API_KEYAn api key from transitland. -
GTFS_CACHE_DIRFolder to save cached files to. Defaults to~/.cache/gtfs-aggregator-checker
python -m gtfs_aggregator_checker [YAML_FILE] [OPTIONS]
python -m gtfs_aggregator_checker or python -m gtfs_aggregator_checker /path/to/yml will search a Cal-ITP agencies.yml file for any urls and see
if they are present in any of the feed aggregators. Alternatively you can use a
--csv-file or --url instead of an agencies.yml file.
The final line of stdout will tell how many urls were in agencies.yml and how
many of those were matched in a feed.
python -m gtfs_aggregator_checker --helpprint the help--csv-file agencies.csvload a csv instead of a Cal-ITP agencies yaml file (one url per line)--url http://example.comCheck a single url instead of a Cal-ITP agencies yaml file--output /path/to/file.jsonSave the results as a json file
Clone this repo and pip install -e /pat/to/feed-checker to develop locally.
By default, downloaded files (raw html files, api requsets) will be saved to
~/.cache/calitp_gtfs_aggregator_checker. This greatly reduces the time
required to run the script. Delete this folder to reset the cache.