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

Version Path
maruku-0.2.13 bin/maruku
maruku-0.2.8 bin/maruku
maruku-0.2.3 bin/maruku
maruku-0.2.10 bin/maruku
maruku-0.2.9 bin/maruku
maruku-0.2.12 bin/maruku
maruku-0.2.1 bin/maruku
maruku-0.2 bin/maruku
maruku-0.2.6 bin/maruku
maruku-0.2.4 bin/maruku
maruku-0.2.11 bin/maruku
maruku-0.2.5 bin/maruku
maruku-0.2.7 bin/maruku