I wrote this script* to easily calculate if I was on track for NaNoWriMo and to automatically generate commit messages based on my progress.
This script does two things:
- Reports how close the user is to the word count for the day
- If
cm
is passed as an argument, it will git add, commit, and push to a repository with a message that records the current word count and which day of the month it is
This has only been tested in Ubuntu
Download and chmod +x
to make the script executable.
./script.sh # for just viewing your progress
./script.sh cm # for viewing progress and committing to git
- All text needs to be in one
.txt
file. Presumably other types of files can also be used if the commandwc
works on them - git repository is already set up, including the remote upstream
The script could be modified to take in multiple files, and of course the echo text can be changed to suit your needs. Hope this helps!
* The script is located here. Of course, if you're looking at this on github gists, then that's obvious, but this is more in case you're looking through bl.ocks