Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
16 lines (13 sloc) 297 Bytes
task :default => :parse
task :parse do
require "json"
require "batch"
require "rdiscount"
Batch.each(Dir["**/*.json"] + Dir["**/*.md"]) do |file|
if File.extname(file) == ".md"
RDiscount.new(File.read(file)).to_html
else
JSON.parse(File.read(file))
end
end
end