Sha256: 0ecee15cd505762011164592f64e6117aca69f49144e51ecd2f26862ede7d0ad

Contents?: true

Size: 533 Bytes

Versions: 1

Compression:

Stored size: 533 Bytes

Contents

#!/usr/bin/env ruby
# Invoke as: ./relaton-doc FILENAME STYLESHEET RELATON-ROOT
require "nokogiri"
require "relaton/cli"

unless ARGV.size == 3
  warn "Invoke as: ./relaton-doc <relaton-xml> <stylesheet> <output-root>"
  exit
end

filename = ARGV[0]
stylesheet = ARGV[1]
relaton_root = ARGV[2] || "relaton"

file = File.read(ARGV[0], encoding: "utf-8")

xml_to_html = Relaton::Cli::XmlToHtmlRenderer.new

File.open(filename.sub(/\.xml$/, ".html"), "w:UTF-8") do |f|
  f.write(xml_to_html.render(file, stylesheet, relaton_root))
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
relaton-cli-0.1.0 exe/relaton-xml-html