Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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

This comment has been minimized.

Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.