Skip to content

Instantly share code, notes, and snippets.

@mrjabba
Created July 1, 2011 00:03
Show Gist options
  • Save mrjabba/1057590 to your computer and use it in GitHub Desktop.
Save mrjabba/1057590 to your computer and use it in GitHub Desktop.
Log formatter for git log that's an git svn clone
require 'nokogiri'
puts "Start formatting git log to remove stuff after the @.."
doc = Nokogiri::HTML(open('log.xml'))
doc.css('event @author').each do |author|
name = author.content
author.content = name[0,name.index('@')]
end
File.open("log_formatted.xml", 'w') {|f| f.write(doc.to_xml) }
puts "Done!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment