File: render.rb

package info (click to toggle)
jblas 1.2.3-5
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 30,120 kB
  • ctags: 2,710
  • sloc: java: 12,202; ansic: 4,620; ruby: 2,339; xml: 348; makefile: 159; 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