Sha256: feceea2a565eca741fbf0290e9b75be6540efe6ec8131c8a495811d45967318f
Contents?: true
Size: 1015 Bytes
Versions: 5
Compression:
Stored size: 1015 Bytes
Contents
#!/usr/bin/env ruby require 'optparse' require 'markdown_helper' options = {:pristine => false} parser = OptionParser.new do|opts| opts.banner = "Usage: #{__FILE__} [options] template_file_path markdown_file_page" 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 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(options) unless ARGV.size == 2 usage(options) unless File.readable?(template_file_path) usage(options) unless File.writable?(File.dirname(markdown_file_path)) MarkdownHelper.new(options).resolve(template_file_path, markdown_file_path)
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
markdown_helper-1.5.1 | bin/resolve |
markdown_helper-1.5.0 | bin/resolve |
markdown_helper-1.0.0 | bin/resolve |
markdown_helper-0.2.4 | bin/resolve |
markdown_helper-0.2.3 | bin/resolve |