<commit_before># casperjs-as-a-service

A CasperJS web service for scraping the web.

## How to start the service?

```
docker run -p 127.0.0.1:$HOSTPORT:80 \
  metmajer/casperjs-as-a-service
```

## How to issue jobs?

```
curl -f -H "Content-Type: application/json" http://localhost/job \
  -d '{"source": "https://github.com/metmajer/casperjs-test.git", "branch": "master", "contextDir": "tests"}'
```

Where `source` is a URI to a Git repository, `branch` is an *optional* branch name and `contextDir` is an optional, relative path to a directory inside the Git repository.

# LICENSE

Licensed under the MIT License. See the LICENSE file for details.<commit_msg>Update documentation with working example.<commit_after># casperjs-as-a-service

A CasperJS web service for scraping the web.

## How to start the service?

```
export HOSTPORT=36000
docker run -p 127.0.0.1:$HOSTPORT:80 \
  metmajer/casperjs-as-a-service
```

## How to issue jobs?

```
curl -f -H "Content-Type: application/json" http://127.0.0.1:$HOSTPORT/job \
  -d '{"source": "https://github.com/metmajer/casperjs-test.git", "branch": "master", "contextDir": "tests"}'
```

Where `source` is a URI to a Git repository, `branch` is an *optional* branch name and `contextDir` is an optional, relative path to a directory inside the Git repository.

# LICENSE

Licensed under the MIT License. See the LICENSE file for details.
{'fraction_non_alphanumeric': 0.13978494623655913, 'fraction_numerical': 0.01935483870967742, 'mean_word_length': 4.1512915129151295, 'pattern_counts': {'":': 6, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 3, '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': '1388552', 'n_tokens_mistral': 485, 'n_tokens_neox': 452, 'n_words': 161}