Skip to content

Instantly share code, notes, and snippets.

View samdalton's full-sized avatar

Sam Dalton samdalton

  • Auckland || San Francisco
View GitHub Profile
@samdalton
samdalton / git-summary.rb
Created July 3, 2012 21:50
Generate a summary of commits in the last week from a series of git repos
#!/usr/bin/env ruby
if ['-h', '--help', 'help', '--help'].include? ARGV.first
puts "./git-summary <git-dir-1> <git-dir-n>"
exit
end
git_cmd = 'git log --since="1 week ago" --author=`whoami` --branches=master --format="%s" --no-merges'
dirs = ARGV.to_a
# Q1
input = 'FourscoreandsevenyearsagoourfaathersbroughtforthonthiscontainentanewnationconceivedinzLibertyanddedicatedtothepropositionthatallmenarecreatedequalNowweareengagedinagreahtcivilwartestingwhetherthatnaptionoranynartionsoconceivedandsodedicatedcanlongendureWeareqmetonagreatbattlefiemldoftzhatwarWehavecometodedicpateaportionofthatfieldasafinalrestingplaceforthosewhoheregavetheirlivesthatthatnationmightliveItisaltogetherfangandproperthatweshoulddothisButinalargersensewecannotdedicatewecannotconsecratewecannothallowthisgroundThebravelmenlivinganddeadwhostruggledherehaveconsecrateditfaraboveourpoorponwertoaddordetractTgheworldadswfilllittlenotlenorlongrememberwhatwesayherebutitcanneverforgetwhattheydidhereItisforusthelivingrathertobededicatedheretotheulnfinishedworkwhichtheywhofoughtherehavethusfarsonoblyadvancedItisratherforustobeherededicatedtothegreattdafskremainingbeforeusthatfromthesehonoreddeadwetakeincreaseddevotiontothatcauseforwhichtheygavethelastpfullmeasureofdevotionthatweherehighlyresolveth