<commit_before>Ajax-mirror
===========

A casperjs script for cloning ajax and javascript heavy websites for offline viewing.

Uses [mockjax](https://github.com/appendto/jquery-mockjax) to mock ajax calls to local JSON.

Currently about 45% working.

Note: This script is currently site specific, I'll change that soon.
###ToDo
* Async
* stablity testing
* faster
* better way to pull page source

Usage:
```
$capserjs Ajax-mirror.js
```

Notes:
Embedded youtube not working<commit_msg>Updated read me<commit_after>Ajax-mirror
===========

A casperjs script for cloning ajax and javascript heavy websites for offline viewing.

Uses [mockjax](https://github.com/appendto/jquery-mockjax) to mock ajax calls to local JSON.

Currently about 45% working.

Note: This script is currently site specific, I'll change that soon.
###ToDo
* Async
* stablity testing
* faster
* better way to pull page source
    - grab page source from resources, first thing loaded
* resume?
* stop downloading files


###Done
* not clones pages with #'s
    - ie: index.html#somesection
Usage:
```
$capserjs Ajax-mirror.js
```

Target site defaults to localhost:5000
set target either in file or with --s=http://example.com 
                            or --server=http://example.com
run with k, `casperjs Ajax-mirror.js k`, to convert links to the current working directory.

Notes:
Embedded youtube not working
{'fraction_non_alphanumeric': 0.10173160173160173, 'fraction_numerical': 0.005772005772005772, 'mean_word_length': 4.02536231884058, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1130233', 'n_tokens_mistral': 438, 'n_tokens_neox': 392, 'n_words': 164}