Skip to content

Instantly share code, notes, and snippets.

@olivierlacan
Last active May 2, 2016 21:51
Show Gist options
  • Save olivierlacan/f382318a6548d7f5ed470be5b80bd085 to your computer and use it in GitHub Desktop.
Save olivierlacan/f382318a6548d7f5ed470be5b80bd085 to your computer and use it in GitHub Desktop.
Ruby Changelog Parser. Should work with files like: http://svn.ruby-lang.org/repos/ruby/tags/v2_3_1/ChangeLog
require "vandamme"
require "github/markup"
header = /(\w+ \w+ \d+) (\d+:\d+:\d+ \d+) (\w+ \w+ <.+>)/
changelog = File.read("ChangeLog.txt")
parser = Vandamme::Parser.new(changelog: changelog, version_header_exp: header, format: 'markdown')
File.open("ChangeLog.html", "w") do |f|
GitHub::Markup.render('README.markdown', "* One\n* Two")
f.write parser.to_html
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment