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-1.1.0 bin/html2doc
html2doc-1.0.8 bin/html2doc
html2doc-1.0.7 bin/html2doc
html2doc-1.0.6 bin/html2doc
html2doc-1.0.5 bin/html2doc
html2doc-1.0.4 bin/html2doc
html2doc-1.0.3 bin/html2doc
html2doc-1.0.2 bin/html2doc
html2doc-1.0.1 bin/html2doc
html2doc-1.0.0 bin/html2doc
html2doc-0.9.4 bin/html2doc
html2doc-0.9.3 bin/html2doc
html2doc-0.9.2 bin/html2doc
html2doc-0.9.1 bin/html2doc
html2doc-0.9.0 bin/html2doc
html2doc-0.8.14 bin/html2doc
html2doc-0.8.13 bin/html2doc
html2doc-0.8.12 bin/html2doc
html2doc-0.8.11 bin/html2doc
html2doc-0.8.10 bin/html2doc