Sha256: 114e6b809497ae5a4a85b0fe101d84017a6519e98a3778fc0f61bb756c89ab50
Contents?: true
Size: 1.13 KB
Versions: 4
Compression:
Stored size: 1.13 KB
Contents
#!/usr/bin/env ruby $LOAD_PATH << File.expand_path(File.dirname(__FILE__) + "/../lib") require 'optparse' require 'mizuho/generator' $KCODE = 'UTF-8' options = {} parser = OptionParser.new do |opts| opts.banner = "Usage: mizuho [options] INPUT" opts.separator "" opts.separator "Options:" opts.on("-t", "--template FILE", String, "Specify a template file to use.") do |value| options[:template] = value end opts.on("-m", "--multi-page", "Generate one file per chapter.") do |value| options[:multi_page] = value end opts.on("--icons-dir DIR", "Specify the directory in which icons\n" << "#{' ' * 37}should be searched. Defaults to\n" << "#{' ' * 37}'images/icons'.") do |value| options[:icons_dir] = value end opts.on("-o", "--output FILE", String, "Specify the output filename.") do |value| options[:output] = value end end begin parser.parse! rescue OptionParser::ParseError => e puts e puts puts "Please see '--help' for valid options." exit 1 end begin if ARGV.empty? puts parser exit 1 else Mizuho::Generator.new(ARGV[0], options).start end rescue Mizuho::GenerationError STDERR.puts "*** ERROR" exit 2 end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
FooBarWidget-mizuho-0.9.2 | bin/mizuho |
FooBarWidget-mizuho-0.9.3 | bin/mizuho |
FooBarWidget-mizuho-0.9.4 | bin/mizuho |
FooBarWidget-mizuho-0.9.5 | bin/mizuho |