# this file parses git log scrapes of commit authors and counts them.
# in some cases it gives you a very primitive metric for authorship and
# authority; however these are definitely numbers to consider with a
# grain of salt.

require 'rubygems'
require 'awesome_print'

filename = ARGV[0]
authorship = {}

File.open(filename).each_line do |line|
  author = line.gsub(/Author: /, "").chomp.split[0].downcase
  if authorship[author]
    authorship[author] += 1
  else
    authorship[author] = 1
  end
end

ap authorship


# this file parses git log scrapes of commit authors and counts them.
# in some cases it gives you a very primitive metric for authorship and
# authority; however these are definitely numbers to consider with a
# grain of salt.

require 'rubygems'
require 'awesome_print'

filename = ARGV[0]
authorship = {}

File.open(filename).each_line do |line|
  author = line.gsub(/Author: /, "").chomp.split.tap(&:pop).join(' ').downcase
  if authorship[author]
    authorship[author] += 1
  else
    authorship[author] = 1
  end
end

ap authorship


Change output to handle full names
Change output to handle full names

When authors have full names, people with the same first name were getting glommed together. This changes the output to everything before the email, normalized for spaces and capitalization.