A Magical Web Screenshot Project
Crystal Ball 🔮 is a library that takes an array or file of URLs and returns a report with screenshots (using Puppeteer), application headers and src/href references.
For information on downloading and installing Node.js, see nodejs.org.
$ npm install crystalball -g
The first parameter is URL(s) (encapsulated in quotes, separated by commas) or a filename and followed by individual options.
prefix
: Prefix http and https to each URLport
: Add additional port 8080 for HTTP and 8443 for HTTPSfile
: Use the first parameter as a filename (instead of URLs) to parse (URLs separated by a new line)
If the last argument is a number, it will specify the number of concurrent connections (default = 10).
Note: The file
argument must be included to use a filename.
Array of URLS:
crystalball 'http://example.com, http://example1.com'
Array of URLS with Options:
crystalball 'http://example.com, http://example1.com' prefix ports 15
File (must include file
argument):
crystalball 'example.txt' file
File with Options:
crystalball 'example.txt' file prefix ports 15
Note: The first argument should be encapsulated in quotes.
$ npm install crystalball
Import: import * as O from "crystalball";
Require: const O = require("crystalball");
Options are passed as an object with the following properties and values.
file : true
: Use filename as argumentfilename: "example"
: Report filename (defaults tocb
)prefix: true
: Prefix http and httpsports : boolean
: Add port 8080 for http and port 8443 for httpsconnections : number
: Number of concurrent connections (default = 10)
O.see("example.txt", { file: true, filename: "example", prefix: true });
=> Report output in ./crystalball/example_date.html
=> Data output in ./crystalball/data/
The see
function takes an array of URLS and options.
O.see(["http://www.example.com", "http://www.example2.com"], options);
=> Report output in ./crystalball/cb_date.html
=> Data output in ./crystalball/data/
The file
function takes a filename and options.
O.file("example.txt", options);
=> Report output in ./crystalball/cb_date.html
=> Data output in ./crystalball/data/
- HTML report with screenshots, application headers and src/href references at
./crystalball/cb_date.html
. (Note: Clicking on each screenshot will toggle size) - Data files with application source, headers and src/href references at
./crystalball/data/
.