项目作者: qwazwsx

项目描述 :
🚗 batch download images from Minnesota (and Iowa) traffic cameras (IRIS)
高级语言: JavaScript
项目地址: git://github.com/qwazwsx/traffic-cameras.git
创建时间: 2018-07-25T04:50:04Z
项目社区:https://github.com/qwazwsx/traffic-cameras

开源协议:GNU General Public License v3.0

下载


traffic-cameras

(better quality here)


npm version

Easily batch download images from Minnesota (and Iowa) traffic cameras

  • easy to use

  • powerful command line options

  • option to save metadata

  • adjustable concurrent requests

How do I install this?

to install via NPM type the following into terminal:

npm i -g traffic-cameras

this will install the module globally, meaning you can use traffic-cameras in terminal to run it

Examples

  • download all MN traffic cameras to the current directory

    traffic-cameras

  • download all MN traffic cameras to a folder called ‘images’

    traffic-cameras --directory images

  • download all MN traffic cameras into their own folder (if you want to do timelapses) *This option changes how files are titled so you can run this command on a timer and generate a timelapse

traffic-cameras --folders

  • download all Iowa traffic camera images to the current directory

traffic-cameras --json https://tr.511ia.org/tgcameras/api/cameras

Command line options

long_argument short input type description default
—timeout -t integer specifies the timeout (in ms) for downloading individual images 4000
—retries -r integer number of times to attempt retrying the download of a broken image 3
—concurrency -c integer number of concurrent downloads supported 10
—verbose -v n/a (flag) enables more detailed terminal logging disabled
—quiet -q n/a (flag) disables ALL console output disabled
—log -l n/a (flag) saves verbose output to log.log disabled
—directory -d file path directory/path to save images to current directory
—json -j url URL of camera api JSON file to fetch cameras from *see below y
—folders -f n/a (flag) separates each camera to its own folder. useful for creating timelapses disabled
—no-metadata -m n/a (flag) disables saving of metadata JSON files enabled (ie metadata is saved)

* the default value for —json is https://tr.511mn.org/tgcameras/api/cameras