wordgoal
is a command line tool for graphing your word count toward a goal.
wordgoal
requires Python 3.8 or later.
pip install wordgoal
wordgoal
reads configuration from a YAML file named wordgoal.yml
inside each directory.
For an example, see the wordgoal.yml file for this project.
In order of precedence, a document's word count goal can be described by:
-
A Markdown document's goal can be described in its front matter:
--- goal: words: 400 --- # My 400-word short story It was the best of times…
-
Any file's goal can be described in its directory's
wordgoal.yml
:files: short-story.txt: goal: 2000 long-story.txt: goal: 80000
-
To apply the same goal to all the files in a directory, set the default in that directory's
wordgoal.yml
:default: goal: 2000
-
If neither a goal nor a default has been described for a file, a goal of 1,000 words will be assumed.
wordgoal
tracks the following files in each directory and subdirectory:
*.markdown
*.md
*.text
*.txt
To ignore a specific file or subdirectory, add its name to that directory's wordgoal.yml
:
ignore:
- LICENCE.txt # file
- drafts # subdirectory
Styling options can be set in each directory's wordgoal.yml
:
style:
fractions: true # <current word count> / <goal>
percentages: true
wordgoal
uses:
- cariad/boringmd to extract plain text and front matter from Markdown files.
- cariad/progrow to render progress bars.
My name is Cariad, and I'm an independent freelance DevOps engineer.
I'd love to spend more time working on projects like this, but--as a freelancer--my income is sporadic and I need to chase gigs that pay the rent.
If this project has value to you, please consider ☕️ sponsoring me. Sponsorships grant me time to work on your wants rather than someone else's.
Thank you! ❤️