Sha256: 2e8aa02e9a98d0edbd026abf35cec59f43e68517b9cff6fc2faec05338e75bb5

Contents?: true

Size: 1003 Bytes

Versions: 2

Compression:

Stored size: 1003 Bytes

Contents

#!/usr/bin/env ruby
require "optparse"
$: << File.expand_path("../../lib/", __FILE__)
require "murdoc"

options = {}

option_parser = OptionParser.new do |opts|
  opts.banner = "murdoc <input file> <output html>"

  opts.on("--[no-]syntax-highlight", "Highlight syntax using pygments") do |h|
    options[:highlight] = h
  end

  opts.on("-t", "--template [FILENAME]", "Use custom haml template for output") do |t|
    options[:template] = t
  end

  opts.on("-s", "--stylesheet [FILENAME]", "Use custom css stylesheet for output") do |s|
    options[:stylesheet] = s
  end

  opts.on("--do-not-count-comment-lines") do |dncl|
    options[:do_not_count_comment_lines] = dncl
  end

  opts.on_tail("-h", "--help", "Show this message") do
    puts opts
    exit
  end

end

option_parser.parse!

if ARGV.size < 2
  puts option_parser
else
  if ARGV.size == 2
    Murdoc.generate_from_file(ARGV[0], ARGV[1], options)
  else
    Murdoc.generate_from_multiple_files(ARGV[0..-2], ARGV[-1], options)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
murdoc-0.2.1 bin/murdoc
murdoc-0.2.0 bin/murdoc