# Word Count Script requested

**URL:** <https://forum.beeminder.com/t/word-count-script-requested/963>\
**Category:** Tech\
**Created:** [July 16, 2015, 4:15pm UTC](https://forum.beeminder.com/t/word-count-script-requested/963 "2015-07-16T16:15:53Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![philip](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.beeminder.com/philip/32/1505_2.png) [@philip](https://forum.beeminder.com/u/philip)\
**Post date:** [July 18, 2015, 7:33pm UTC](https://forum.beeminder.com/t/word-count-script-requested/963/4 "2015-07-18T19:33:03Z")

</div>

Excellent. In that case, the above will do the trick.

Even with a dedicated count-these-files writing folder, you’ll probably want to build some safety measures into your Hazel file-matching rules, like

- not if modified in the last X minutes
- only if modified in the last day

If you create an ordinary **do more** Beeminder goal, then a script similar to this should work fine:

```
bmndr mygoal $(cat "$1" | wc -w) "$1"

```

If you keep modifying the files in place, Hazel will keep adding **new** datapoints to your goal, each with the current total word count, which is almost certainly not what you want. If you only ever copy across writing that is ‘done’, it shouldn’t be an issue. If that’s where you keep your work-in-progress, you’ll have to come up with a counting scheme that you’re happy with.

Premium subscribers could do something fancy with the **[aggregation](http://forum.beeminder.com/t/documentation-of-aggregation-methods-would-be-nice/549/4)** settings, but there’s no single straightforward generic answer.

Let me know how it goes.

---

_[View the full topic](https://forum.beeminder.com/t/word-count-script-requested/963)._
