Sha256: 905aacfc14941e836062d17fdc7a4d4e06f6ef595ba5e3218820e7fd650978fb
Contents?: true
Size: 1 KB
Versions: 3
Compression:
Stored size: 1 KB
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 resolve [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 image descriptions. EOT exit end parser.parse! _, template_file_path, markdown_file_path = ARGV usage(opts) unless ARGV.size == 3 usage(opts) unless File.readable?(template_file_path) MarkdownHelper.new(options).resolve(template_file_path, markdown_file_path)
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
markdown_helper-1.8.0 | bin/_resolve |
markdown_helper-1.7.0 | bin/_resolve |
markdown_helper-1.6.1 | bin/_resolve |