Sha256: 87e546681c1ea745da1ee68599d08df44737811991ab64f84e1c0ad38fd61ed5

Contents?: true

Size: 1010 Bytes

Versions: 1

Compression:

Stored size: 1010 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_source] = 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

1 entries across 1 versions & 1 rubygems

Version Path
murdoc-0.1.13 bin/murdoc