Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
6 lines (6 sloc) 249 Bytes
filename = ARGV[0]
text = File.open(filename).read
text.gsub!(/\[(.+)\]\((.+)\)/) { '<a href="' + $2 + '" target="_blank">' + $1 +
'</a>' }
File.new("#{ARGV[0]}.html", 'w').write(text)
puts ARGV[0] + " successfully converted to " + ARGV[0] + ".html"