# 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:** 2

<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 16, 2015, 7:29pm UTC](https://forum.beeminder.com/t/word-count-script-requested/963/2 "2015-07-16T19:29:21Z")

</div>

I use Hazel to [merge my TagTime logs](http://forum.beeminder.com/t/a-good-approach-to-merge-tagtime-logs/289/8) and update the relevant Beeminder goals. (screenshots in the linked forum post!)

That’s a good idea, having Hazel upload word counts. One thing to be mildly careful of is that our Draft integration gives you credit for editing (i.e. deleting) words. The easy shell script version is only going to report the current word count on existing files…

For updating Beeminder, you’ll want to grab a copy of [@bkam’s bmndr script](https://github.com/lydgate/bmndr) or [my forked version](https://github.com/pjjh/bmndr). Then you can run something like this to update mygoal with the wordcount and a comment of the filename:

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

There’s obviously a relationship between your Hazel setup and how you configure your Beeminder goal. What did you have in mind?

* * *

_For those playing along at home, [Hazel](http://www.noodlesoft.com/hazel.php) is an awesome and flexible Mac automation utility. Rules watch for changes in files or folders, and trigger a wide variety of actions, including arbitrary scripts._

---

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