Sha256: bd92c56460f206c167b37a6f720f4b4b36605af052868e111fb9522f05e2ad6f

Contents?: true

Size: 627 Bytes

Versions: 8

Compression:

Stored size: 627 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

8 entries across 8 versions & 1 rubygems

Version Path
html2doc-1.3.1 bin/html2doc
html2doc-1.3.0.1 bin/html2doc
html2doc-1.3.0 bin/html2doc
html2doc-1.2.1 bin/html2doc
html2doc-1.2.0 bin/html2doc
html2doc-1.1.4 bin/html2doc
html2doc-1.1.3 bin/html2doc
html2doc-1.1.2 bin/html2doc