Word Count Script requested

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 settings, but there’s no single straightforward generic answer.

Let me know how it goes.

2 Likes