Sha256: 86c2bb1dbe5184de1025ffdc6775963a12ba1575c19bf471b44c153696f19ffe
Contents?: true
Size: 977 Bytes
Versions: 13
Compression:
Stored size: 977 Bytes
Contents
#!/usr/bin/env ruby require 'optparse' require 'markdown_helper' options = {:pristine => false} # Save opts for use below. opts = nil parser = OptionParser.new do |_opts| opts = _opts _opts.banner = "Usage: markdown_helper include [options] template_file_path markdown_file_path" _opts.on('--pristine', 'No comments added') do |_| options[:pristine] = true end _opts.on('--help', 'Display help') do usage(_opts) end end def usage(opts) puts '' puts opts puts <<-EOT where * template_file_path is the path to an existing file. * markdown_file_path is the path to a file to be created. Typically: * Both file types are .md. * The template file contains file inclusion descriptions. EOT exit end parser.parse! _, template_file_path, markdown_file_path = ARGV usage(opts) unless ARGV.size == 3 MarkdownHelper.new(options).include(template_file_path, markdown_file_path)
Version data entries
13 entries across 13 versions & 1 rubygems