<commit_before># fswatch
[![Build Status](https://drone.io/github.com/shxsun/fswatch/status.png)](https://drone.io/github.com/shxsun/fswatch/latest)

A definition of **fswatch**: Command line tool. Use file system event to trigger user defined commands. 


fswatch will follow 3 steps.

1. notify if file under current directory changes.
2. filter event by `.gitignore`
3. do user defined commands(passed by commands)

## How to use
*I will show you an example*

* Demo Video <http://www.tudou.com/programs/view/NMOOE-Lj5Sc/>
* Demo video(no voice) <http://asciinema.org/a/7247>

```
go get github.com/shxsun/fswatch
# cd to a golang project
# ...
fswatch go test

# open a new shell, cd to the same place
touch test.go

# now fswatch should do some tests. (if nothing happens, tell me)
```

![fswatch](images/fswatch.png)

## Shell help<commit_msg>add sourcegragh total views<commit_after># fswatch
[![Build Status](https://drone.io/github.com/shxsun/fswatch/status.png)](https://drone.io/github.com/shxsun/fswatch/latest)
[![Total views](https://sourcegraph.com/api/repos/github.com/shxsun/fswatch/counters/views.png)](https://sourcegraph.com/github.com/shxsun/fswatch)

A definition of **fswatch**: Command line tool. Use file system event to trigger user defined commands. 


fswatch will follow 3 steps.

1. notify if file under current directory changes.
2. filter event by `.gitignore`
3. do user defined commands(passed by commands)

## How to use
*I will show you an example*

* Demo Video <http://www.tudou.com/programs/view/NMOOE-Lj5Sc/>
* Demo video(no voice) <http://asciinema.org/a/7247>

```
go get github.com/shxsun/fswatch
# cd to a golang project
# ...
fswatch go test

# open a new shell, cd to the same place
touch test.go

# now fswatch should do some tests. (if nothing happens, tell me)
```

![fswatch](images/fswatch.png)

## Shell help
{'fraction_non_alphanumeric': 0.13225806451612904, 'fraction_numerical': 0.00967741935483871, 'mean_word_length': 4.1551246537396125, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 6, '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': '4750423', 'n_tokens_mistral': 673, 'n_tokens_neox': 648, 'n_words': 198}