Skip to content

Instantly share code, notes, and snippets.

@oieioi
Created October 18, 2017 09:42
Show Gist options
  • Save oieioi/d47ad62c403cd002f86f078532a040d8 to your computer and use it in GitHub Desktop.
Save oieioi/d47ad62c403cd002f86f078532a040d8 to your computer and use it in GitHub Desktop.
def main
lines = STDIN.read.split(/\n/)
sum = {}
lines.each {|line|
name = line.match(/\((.+) \d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d/)[1].strip
sum[name] = 0 if sum[name].nil?
sum[name] = sum[name] + 1
}
sum.each {|key, v|
puts "#{v} lines added by #{key}"
}
end
main
@oieioi
Copy link
Author

oieioi commented Oct 18, 2017

git ls|xargs -Ifile git --no-pager --show-email blame file|ruby ./sum.rb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment