Last active
October 11, 2020 11:42
-
-
Save secretGeek/a7a9a99fb785441f5346 to your computer and use it in GitHub Desktop.
count.ps1 -- determine number of words added to .md files, and number of tasks done in todo.txt; craft a commit message with this data, and commit all work.
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
Get-Content *.md | Measure-Object –Word | % { $count = $_.Words } | |
hg add | |
$message = "words: " + $count | |
$todo = (get-content .\todo.txt | select-string -pattern "[_]").length | |
$done = (get-content .\todo.txt | select-string -pattern "[x]").length | |
$message = $message + ", tasks: " + $done + "/" + ($todo + $done) + "" | |
hg commit -m $message | |
& .\progress.ps1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I made a fork, because the lack of a space after the colon after words is infuriating.
But I don't see how to send you a pull request...