Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 19 lines (17 sloc) 437 Bytes
#!/usr/bin/env ruby
here = File.expand_path File.dirname __FILE__
$:<<here
ARGV.each do |arg|
old_path = arg
new_path = arg.gsub(/\.md$/, '.step')
old = File.read(old_path)
puts new_path
File.open(new_path, "w") do |f|
f.puts "div do"
f.puts "message <<-MARKDOWN"
f.write old.
gsub(/^# (.*)$/, " MARKDOWN\nend\n\nstep \"\\1\" do\n message <<-MARKDOWN\n")
f.puts " MARKDOWN"
f.puts "end"
end
end
Jump to Line
Something went wrong with that request. Please try again.