<commit_before>diffux-core
===========

Core services used by diffux/diffux<commit_msg>Add example of `diffux-snapshot` to README<commit_after>diffux-core
===========

Core services used by diffux/diffux

## Command-line tools

`diffux-core` comes with a couple of useful command-line tools.

### `diffux-snapshot`

Take a snapshot of a URL and save as a PNG image.

#### Example

Take a snapshot of http://www.google.com in a 1200 pixel wide window and save
as "google.png":

```bash
diffux-snapshot --url http://www.google.com \
                --outfile google.png -- \
                --width 1200
```

Take a snapshot of http://www.google.com in a 320 pixel wide window, use a
custom user-agent header, and save as "google-mobile.png":

```bash
diffux-snapshot --url http://www.google.com \
                --outfile google-mobile.png -- \
                --width 320 \
                --useragent "c3p0 (Netscape compatible)"
```
{'fraction_non_alphanumeric': 0.13903743315508021, 'fraction_numerical': 0.017112299465240642, 'mean_word_length': 2.6, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '545249', 'n_tokens_mistral': 301, 'n_tokens_neox': 276, 'n_words': 96}