Sha256: 2cfe6f47ef0b2debba95d2d16b83bfc5f81fec35be2f3caaaaf9f4f4dc42a597
Contents?: true
Size: 1.08 KB
Versions: 1
Compression:
Stored size: 1.08 KB
Contents
#!/usr/bin/env ruby require 'optparse' require 'dnote' options = {} opts = OptionParser.new do |opt| opt.banner = "Usage: dnote [OPTIONS] path1 [path2 ...]" opt.on("--label", "debug and verbose modes combined") do |lbl| options[:labels] ||= [] options[:labels] << lbl end opt.on("--output", "-o [DIR]", "folder to store output") do |out| options[:output] = out end opt.on("--debug", "debug mode") do $DEBUG = true end opt.on("--verbose", "-v", "verbose mode") do options[:verbose] = true end opt.on("--quiet", "-q", "surpress output") do options[:quiet] = true end opt.on("--noop", "-n", "pretend mode") do options[:quiet] = true end opt.on("--dryrun", "noop and verbose modes combined") do options[:verbose] = true options[:noop] = true end opt.on("--trace", "debug and verbose modes combined") do $DEBUG = true options[:verbose] = true end opt.on_tail('--help', '-h', "show this help information") do puts self exit end end opts.parse! paths = ARGV.dup dnote = DNote.new(paths, options) dnote.document
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dnote-0.8 | bin/dnote |