Last active
May 2, 2016 21:51
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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