Sha256: 8e0157fc6c60570407d13d318c84189d1697189639c971a270190cc08cc1d5f8

Contents?: true

Size: 646 Bytes

Versions: 32

Compression:

Stored size: 646 Bytes

Contents

#!/usr/bin/env ruby

require "html2doc"
require "optparse"

options = {}
OptionParser.new do |opts|
  opts.banner = "Usage: bin/html2doc filename [options]"

  opts.on("--stylesheet FILE.CSS", "Use the provided stylesheet") do |v|
    options[:stylesheet] = v
  end
  opts.on("--header HEADER.HTML", "Use the provided stylesheet") do |v|
    options[:header] = v
  end
end.parse!

if ARGV.length < 1
  puts "Usage: bin/html2doc filename [options]"
  exit
end

Html2Doc.process(
  File.read(ARGV[0], encoding: "utf-8"), 
  filename: ARGV[0].gsub(/\.html?$/, ""),
  stylesheet: options[:stylesheet],
  header: options[:header],
)
                 

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
html2doc-0.8.9 bin/html2doc
html2doc-0.8.8 bin/html2doc
html2doc-0.8.7 bin/html2doc
html2doc-0.8.6 bin/html2doc
html2doc-0.8.5 bin/html2doc
html2doc-0.8.4 bin/html2doc
html2doc-0.8.3 bin/html2doc
html2doc-0.8.2 bin/html2doc
html2doc-0.8.1 bin/html2doc
html2doc-0.8.0 bin/html2doc
html2doc-0.7.1 bin/html2doc
html2doc-0.7.0 bin/html2doc