-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
83 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,31 @@ | ||
node-image-size-scanner | ||
======================= | ||
For a given URL, report image file sizes and paths with optional minimum file size to report on. | ||
For a given URL, report image file sizes and paths. Optionally you may specify a minimum file size to report on. Formatted output or json output. | ||
|
||
## Installation ## | ||
`npm install -g node-image-size-scanner` | ||
|
||
## Usage ## | ||
``` | ||
$ image_check | ||
Usage: image_check -u URL [-b MIN_BYTES_TO_ALERT_ON] | ||
Usage: image_check -u URL [-b MIN_BYTES_TO_ALERT_ON] [-j|-json] | ||
Ex: image_check -u http://www.google.com -b 1k | ||
``` | ||
### Formatted Output ### | ||
``` | ||
$ image_check -u http://www.google.com -b 1k | ||
Image files > 1.00 kB (1000 bytes) | ||
1.83 kB http://www.google.com/images/icons/product/chrome-48.png | ||
209.03 kB http://www.google.com/logos/doodles/2014/halloween-2014-5647569745084416.3-hp.gif | ||
8.23 kB https://www.google.com/images/srpr/logo9w.png | ||
1.83 kB https://www.google.com/images/icons/product/chrome-48.png | ||
``` | ||
### JSON output | ||
``` | ||
$ image_check -u https://www.google.com -b 1k -j | ||
{ url: 'https://www.google.com', | ||
byte_threshold: 1000, | ||
images: | ||
[ { image_url: 'https://www.google.com/images/srpr/logo9w.png', | ||
bytes: 8228 }, | ||
{ image_url: 'https://www.google.com/images/icons/product/chrome-48.png', | ||
bytes: 1834 } ] } | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
{ | ||
"name": "node-image-size-scanner", | ||
"version": "0.0.9", | ||
"description": "For a given URL, report image file sizes and paths with optional minimum file size to report on.", | ||
"version": "0.0.10", | ||
"description": "For a given URL, report image file sizes and paths that exceed a threshold value.", | ||
"main": "image_check.js", | ||
"author": "Kip Gebhardt <[email protected]>", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/rv-kip/node-image-size-scanner/issues" | ||
}, | ||
"dependencies": { | ||
"async": "^0.9.0", | ||
"colors": "^1.0.2", | ||
"filesize": "^2.0.4", | ||
"image-scraper": "^0.1.2", | ||
"image-scraper": "git://github.com/rv-kip/node-image-scraper.git#v0.1.2.1", | ||
"minimist": "^1.1.0", | ||
"request": "^2.45.0", | ||
"sprintf-js": "^1.0.2" | ||
|