Skip to content

Instantly share code, notes, and snippets.

@hsbt
Created August 19, 2012 11:45
Show Gist options
  • Save hsbt/3394422 to your computer and use it in GitHub Desktop.
Save hsbt/3394422 to your computer and use it in GitHub Desktop.
changelog = Hash.new
open('ChangeLog').each do |line|
if line =~ /^(\d{4}\-\d{2}\-\d{2})/
changelog[$1] = ""
else
changelog[changelog.keys.last] << line
end
end
changelog.each {|k, v| system "echo '#{v}' | dayone -d='#{k}' new" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment