Packaging up.

This commit is contained in:
Elf M. Sternberg 2014-01-13 09:05:35 -08:00
commit e057c78976
4 changed files with 53 additions and 0 deletions

8
.gitignore vendored Normal file
View File

@ -0,0 +1,8 @@
*.pyc
*.pyo
*#
.#*
.DS_Store
*~
npm-debug.log
node_modules/*

22
LICENSE Normal file
View File

@ -0,0 +1,22 @@
Copyright (c) 2014 Elf M. Sternberg
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

18
README.md Normal file
View File

@ -0,0 +1,18 @@
# GIT-WC
This is a simple extension to GIT that reports the word count
difference between any two commits. It accepts any standard range
arguments, such as HEAD^..HEAD or <path>..<path>, and tells you how
many words you added since your last commit, minus how many words you
have removed.
Without any arguments, it tells you the difference between your
working tree and the last commit.
I write stories as well as code, I use Markdown as my writing
environment of choice, I commit to a GIT repository regurlarly, and
this is a stimple and straightforward way of tracking my daily
contributions.
The LICENSE is standard MIT style. See the LICENSE file for details.

5
git-wc Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
REM=`git diff --word-diff=porcelain -U $* | grep '^-' | sed 's/^-//' | wc -w`
ADD=`git diff --word-diff=porcelain -U $* | grep '^+' | sed 's/^+//' | wc -w`
DIF=`expr $ADD - $REM`
echo "Word count: $DIF"