transitandtrails-cli
I am a command line client for the Transit
& Trails API. I use
transitandtrails
under
the hood.
Installation
npm install -g transitandtrails-cli
Or, if you want the current development version:
npm install -g "git+https://github.com/mojodna/node-transitandtrails-cli"
Usage
tnt --helptnt -k <key> trailhead -g 292tnt -k <key> trailhead-maps 292
It can be used with jq
to pretty-print and
filter output:
tnt -k <key> trailheads -n 5 | jq .tnt -k <key> trailheads -n 25 | jq '.[22].park_name'
It can also be used with geojson.io to see the raw data on a map:
npm install -g geojsonio-clitnt -k <key> trip 1363 --geojson | geojsonio
Environment Variables
TNT_KEY
- (optional) API key--can be used to avoid passing-k
.TNT_URL_PREFIX
- (optional) alternate URL prefix. Defaults tohttps://www.transitandtrails.org
.
License
Copyright (c) 2013 Seth Fitzsimmons
Published under the MIT license.