The website of the statistics generator in question is:
http://gitstats.sourceforge.net/
Its git repository can be cloned from:
git clone git://repo.or.cz/gitstats.git
What I want to do is something like:
./gitstatus --ext=".py" /input/foo /output/bar
Failing being able to easily pass the above option without heavy modification, I’d just hard-code the file extension I want to be included.
However, I’m unsure of the relevant section of code to modify and even if I did know, I’m unsure of how to start such modifications.
It’s seems like it’d be rather simple but alas…
I found this question today while looking for the same thing. After reading sinelaw’s answer I looked into the code and ended up forking the project.
https://github.com/ShawnMilo/GitStats
I added an “exclude_extensions” config option. It doesn’t affect all parts of the output, but it’s getting there.
I may end up doing a pretty extensive rewrite once I fully understand everything it’s doing with the git output. The original project was started almost exactly four years ago today and there’s a lot of clean-up that can be done due to many updates to the standard library and the Python language.