How can I count the number of words that each contributor wrote in a repository ?
Asked
Active
Viewed 208 times
-1
-
By trying to count them and then asking here when you have a concrete problem? What part are you having trouble with? – Blender Feb 08 '13 at 20:16
-
number of commits? number of lines added? – ogzd Feb 08 '13 at 20:19
1 Answers
0
It is best solved on a local clone of that GitHub, in order to analyze the git log and check each contributor.
See "getting contributor stats", based on:
git log --author="Jared Barboza" --pretty=tformat: --numstat | \
grep -v public/javascripts/jquery | \
gawk '{ add += $1 ; subs += $2 ; loc += $1 - $2 } END \
{ printf "added lines: %s removed lines : %s total lines: %s\n",add,subs,loc }' -
But that is for lines added/removed for a given contributor.
(a bit like in "Git: How to estimate a contribution of a person to my project in terms of added/changed lines of code?")
You can combined a similar approach with the one described in "Quantifying the amount of change in a git diff?".
Or you can use a dedicated program for that, like git-wordcount.