Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Graphing Git commits with git + sh + Perl + Gnuplot

by Bucciarati (Novice)
on May 13, 2009 at 15:41 UTC ( #763801=sourcecode: print w/replies, xml ) Need Help??
Category: One liners
Author/Contact Info
Description: graph git commits over the week
git log --pretty=format:%aD | while read s ; do date -d $s +'%u %H %M'
+ ; done | perl -Mstrict -le 'my $x = {}; while(my ($d, $h, $m) = spli
+t " ", <>){ $d--; $_ = sprintf "%05d", 10_000 * $d + 100 * $h * 99 / 
+23.0 + $m * 99 / 59.0; $x->{$_}++ } print "$_\t$x->{$_}" for sort key
+s %$x' >! /tmp/git_minutes
gnuplot> plot [0:][0:] "/tmp/git_minutes" using 1:2 notitle 
Replies are listed 'Best First'.
Re: Graphing Git commits with git + sh + Perl + Gnuplot
by parv (Priest) on May 14, 2009 at 08:14 UTC
    ... do date -d $s +'%u %H %M' ...

    On CentOS 5, in zsh 4, $s needed to be put in quotes; else date was suggesting to consult date --help.

Re: Graphing Git commits with git + sh + Perl + Gnuplot
by Anonymous Monk on May 14, 2009 at 06:53 UTC
    Ewww, you got shell in there
Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: sourcecode [id://763801]
[ambrus]: 1nickg: obviously the gamers don't know. but anyway, I need the whole room backlit, because watching a monitor in a dark room (like many people do) is tiring for my eyes, even more so than doing it in a lit room.
[1nickt]: ambrus I agree. I suspect one's eyes are always trying to adjust across the boundary between very bright and very dark ... like a camera's autofocus struggling to choose the target.

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (12)
As of 2017-03-27 14:00 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (320 votes). Check out past polls.