itikhonov / git-loc Goto Github PK
View Code? Open in Web Editor NEWShows LOC count history for git repository
Home Page: http://brokestream.com/git-loc.html
Shows LOC count history for git repository
Home Page: http://brokestream.com/git-loc.html
Simple tool to display LOC (lines of code) count history for a git branch. Example: 2010-05-13 14:38:21 42 +44 -2 initial 2010-05-13 14:40:14 44 +3 -1 hashbang added 2010-05-13 14:40:14 49 +8 -3 show last commit too Run it as `git-loc --svg' to output svg graph on stdout. It is possible to specify the .git folder you wish to the repository you wish to get stats about. `git-loc --svg ../another-repo'
Would it be feasible to show the actual values on both of the axes in the SVG output, too?
In this repository https://github.com/jimenezrick/vimerl the next error happens with Python 3.2.2:
Traceback (most recent call last): File "/usr/local/bin/git-loc", line 25, in <module> for x in popen('git log --reverse -p'): File "/usr/lib/python3.2/codecs.py", line 300, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf8' codec can't decode byte 0xf6 in position 1731: invalid start byte
$ ./git-loc --svg ~/Sites/h5bp/html5please/
Traceback (most recent call last):
File "./git-loc", line 68, in <module>
pop()
File "./git-loc", line 33, in pop
pstr="%s %8u %5s %5s %7s %s \t%s"%(d,locs,'+'+str(adds),'-'+str(dels),hsh,who,cmt.strip())
NameError: global name 'hsh' is not defined
I'd like to have real time instead of the commit number on the horizontal axis. Do you think it would be easy to implement?
This should be an optional setting.
I found that when I embed the image in a web page, the tooltip title is not shown. If I change the title attribute to a child node, it does get rendered correctly.
It requires the following changes:
def rect(x,y,w,h,c,t='',a=''):
svg.write("""<rect x="%u" y="%u" width="%u" height="%u" style="%s" %s ><title>%s</title></rect>""" %(x,y,w,h,c,a,t))
bl.append((x-12,0,25,mlocs*yscale,'', """%s %8u %5s %5s %s """%(d,locs,'+'+str(adds),'-'+str(dels),quote(cmt.strip())) ,"""class="o" """))
This fixes my only issue with the script. Not sure why, but embedded as an iframe or an object, I did not get tool tips with title as attribute.
Thanks
I'd like to have an option for counting only specific files. These could be e.g. *.c and *.h, but not some non-code files.
I just tried to run this on a repo and it aborted with the following error:
Traceback (most recent call last):
File "c:/Users/Marcus/Desktop/git-loc.py", line 42, in <module>
for x in popen('git log --no-color --reverse -p'):
File "c:\Python33\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8f in position 1162: cha
racter maps to <undefined>
I unfortunately don't know my way around Python but I found this ticket which has been marked as "WontFix". But probably there's some way around it?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.