Skip to content

Instantly share code, notes, and snippets.

@secretGeek
Last active October 11, 2020 11:42
Show Gist options
  • Save secretGeek/a7a9a99fb785441f5346 to your computer and use it in GitHub Desktop.
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.
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
@doekman
Copy link

doekman commented Oct 2, 2014

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...

@secretGeek
Copy link
Author

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment