Sha256: 82a3ab59bc31733723c9aeac5c272f1f05428cbe8705df0389eec93eeea3a657

Contents?: true

Size: 828 Bytes

Versions: 13

Compression:

Stored size: 828 Bytes

Contents

#!/usr/bin/env ruby

top = File.expand_path(File.join(File.dirname(__FILE__), ".."))
html_dir = File.join(top, "html")

require "fileutils"

css = "base.css"
kcode = "utf8"

options = [
  "-I#{File.join(top, 'misc')}",
  "-S",
  "rd2",
  "-rrd/rd2html-lib",
  "--out-code=#{kcode}",
  proc do |f|
    "--html-title=#{File.basename(f)}"
  end,
#   proc do |f|
#     "--with-css=#{css}"
#   end,
  proc do |f|
    f
  end
]

Dir[File.join(top, "*.{ja,en}")].each do |f|
  if /(README|NEWS)\.(ja|en)\z/ =~ f
    args = options.collect do |x|
      if x.respond_to?(:call)
        x.call(f)
      else
        x
      end
    end
    output_base = File.basename(f).downcase.sub(/(ja|en)\z/, "html.\\1")
    File.open(File.join(html_dir, output_base), "w") do |out|
      out.puts(`ruby #{args.flatten.join(' ')}`)
    end
  end
end

Version data entries

13 entries across 13 versions & 4 rubygems

Version Path
activesambaldap-0.1.0 misc/rd2html.rb
activesambaldap-0.0.9 misc/rd2html.rb
activesambaldap-0.0.8 misc/rd2html.rb
ActiveSambaLdap-0.0.7 misc/rd2html.rb
activesambaldap-0.0.7 misc/rd2html.rb
activeldap-1.0.0 test-unit-ext/misc/rd2html.rb
activeldap-1.0.1 test-unit-ext/misc/rd2html.rb
activesambaldap-0.0.6 misc/rd2html.rb
test-unit-ext-0.4.0 misc/rd2html.rb
test-unit-ext-0.1.0 misc/rd2html.rb
test-unit-ext-0.2.0 misc/rd2html.rb
test-unit-ext-0.3.0 misc/rd2html.rb
test-unit-ext-0.5.0 misc/rd2html.rb