Sha256: bfc99e9e7b1f1479c58a0c2dd64d7060fbf86957a63277740b9c0a569cf116c3
Contents?: true
Size: 505 Bytes
Versions: 13
Compression:
Stored size: 505 Bytes
Contents
#!/usr/bin/env ruby require 'maruku' if File.basename($0) =~ /^maruku/ # Convert each file ARGV.each do |f| puts "Opening #{f}" # read file content input = File.open(f,'r').read # create Maruku doc = Maruku.new(input) # convert to a complete html document html = doc.to_html_document # write to file dir = File.dirname(f) filename = File.basename(f, File.extname(f)) + ".html" out_xml = File.join(dir, filename) File.open(out_xml,'w') do |f| f.puts html end end end
Version data entries
13 entries across 13 versions & 1 rubygems