File: render.rb

package info (click to toggle)
jblas 1.2.0-4
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 46,164 kB
  • sloc: java: 11,050; ansic: 4,152; ruby: 2,290; xml: 289; makefile: 132; sh: 22
file content (10 lines) | stat: -rw-r--r-- 200 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
require 'rubygems'
require 'redcloth'

ARGV.each do |f|
  newf = f.gsub /.textile$/, '.html'
  out = open(newf, 'w') do |o|
    txt = open(f, 'r').read
    o.write RedCloth.new(txt).to_html
  end
end