Created
November 4, 2021 16:48
-
-
Save romilly/89437f44bb34a6a03b54226eca9ed532 to your computer and use it in GitHub Desktop.
Track writing progress for pandoc or LeanPub book
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# capture wordcounts in dayfile | |
# invoke with project root as argument; default is (currently) start-apl | |
# assumes book contents are markdown files in the `manuscript` directory | |
# creates a `progress` direectory if necessary | |
# writes wordcounts (using wc) for each markdown file and totals in a file whose name is based on today's date | |
_project=${1:-start-apl} | |
cd ~/git/active/$_project/ | |
_now=$(date +"%Y%m%d") | |
mkdir -p progress | |
wc manuscript/*.md > "progress/$_now.txt" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment