<commit_before>cronshot.js
===========

Node module that allows you to schedule cron jobs to take, alter, and store web page screenshots

## How

cronshot.js uses:

- [node-webshot](https://github.com/brenden/node-webshot) to take screenshots using [Phantom JS](https://github.com/ariya/phantomjs)

- [node-cron](https://github.com/ncb000gt/node-cron) to schedule screenshots

- [mobstor](http://devel.corp.yahoo.com/ynodejs/mobstor/Client.html) to store screenshots on mobstor

- [gm](https://github.com/aheckmann/gm) to programatically use [ImageMagick](http://www.imagemagick.org/) to manipulate the screenshots

- [async](https://github.com/caolan/async) to allow more than one screenshot cron job to be run in parallel


## Quick Start

* **Install PhantomJS**
 - Make sure you have [homebrew](http://brew.sh/) installed: `ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"`
 - Install PhantomJS: `brew update && brew install phantomjs`


* **Install ImageMagick**

_Note:_ This is only required if you would like to use the Image Magick middleware

 - `brew update && brew install imagemagick`



* **Install local dependencies**
 - `ynpm install`



* **Run the example `cronshot-runner.js`**
 - `node cronshot-runner.js`


## Examples

**Create an Image Transparent and Save To Mobstor Every 10 seconds**

```javascript
var cronshot = require('./src/cronshot');

// Image Magick and Mobstor Screenshot Example
// -------------------------------------------

// Takes a screenshot of a TD applet,<commit_msg>Updated spacing again<commit_after>cronshot.js
===========

Node module that allows you to schedule cron jobs to take, alter, and store web page screenshots

## How

cronshot.js uses:

- [node-webshot](https://github.com/brenden/node-webshot) to take screenshots using [Phantom JS](https://github.com/ariya/phantomjs)

- [node-cron](https://github.com/ncb000gt/node-cron) to schedule screenshots

- [mobstor](http://devel.corp.yahoo.com/ynodejs/mobstor/Client.html) to store screenshots on mobstor

- [gm](https://github.com/aheckmann/gm) to programatically use [ImageMagick](http://www.imagemagick.org/) to manipulate the screenshots

- [async](https://github.com/caolan/async) to allow more than one screenshot cron job to be run in parallel


## Quick Start

* **Install PhantomJS**
 - Make sure you have [homebrew](http://brew.sh/) installed: `ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"`
 - Install PhantomJS: `brew update && brew install phantomjs`


* **Install ImageMagick**

 * _Note:_ This is only required if you would like to use the Image Magick middleware

 - `brew update && brew install imagemagick`



* **Install local dependencies**
 - `ynpm install`



* **Run the example `cronshot-runner.js`**
 - `node cronshot-runner.js`


## Examples

**Create an Image Transparent and Save To Mobstor Every 10 seconds**

```javascript
var cronshot = require('./src/cronshot');

// Image Magick and Mobstor Screenshot Example
// -------------------------------------------

// Takes a screenshot of a TD applet,
{'fraction_non_alphanumeric': 0.1601423487544484, 'fraction_numerical': 0.003235198964736331, 'mean_word_length': 3.706240487062405, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 12, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1284223', 'n_tokens_mistral': 1023, 'n_tokens_neox': 942, 'n_words': 291}