Sha256: a75adc787c0ec5c66b0147e1edd2d8114524c772dc6c6131c1e967867420951f

Contents?: true

Size: 656 Bytes

Versions: 1

Compression:

Stored size: 656 Bytes

Contents

#!/usr/bin/env ruby
require "optparse"
$: << "./lib/"
require "murdoc"

options = {}
source_type = nil

option_parser = OptionParser.new do |opts|
  opts.banner = "murdoc-strip-comments [input file]\n\nWhen no input file is provided, murdoc-strip-comments uses standard input stream."

  opts.on("-t", "--type TYPE", "Source type (html, ruby, javascript)") do |st|
    source_type = st
  end

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

end

option_parser.parse!

annotator = Murdoc::Annotator.from_file(ARGV[0] || "/dev/stdin", source_type, {})
annotator.paragraphs.each do |paragraph|
  puts paragraph.source
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
murdoc-0.1.13 bin/murdoc-strip-comments