Tool for checking if transit urls are on aggregator websites
Project description
GTFS Aggregator Checker
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.
Installation
pip install gtfs-aggregator-checker
Configure
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_KEY
An api key from transitland. -
GTFS_CACHE_DIR
Folder to save cached files to. Defaults to~/.cache/gtfs-aggregator-checker
Getting Started
CLI Usage
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.
Options
python -m gtfs_aggregator_checker --help
print the help--csv-file agencies.csv
load a csv instead of a Cal-ITP agencies yaml file (one url per line)--url http://example.com
Check a single url instead of a Cal-ITP agencies yaml file--verbose
Print a table of all results (organized by domain)--output /path/to/file.json
Save the results as a json file--clear-cache
Deletes the cache folder before running.
Development
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for gtfs_aggregator_checker-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b350b9758ae01bab97e293234598349fa6a62f3ae5a539b883e72755cef9a067 |
|
MD5 | fa508e5beec1293e722602e44e4638e7 |
|
BLAKE2b-256 | 2d358053d792ff6bf54cdf62149f9b2630ba07e547e14d252f8cb634d553536f |