Word Count Script requested

I use Hazel to merge my TagTime logs 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 or my forked version. 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 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.

2 Likes