Sha256: 7436539d52780da9811e5e438e928a3e7a434e4eb4783bed725ae6a28e719e76
Contents?: true
Size: 704 Bytes
Versions: 2
Compression:
Stored size: 704 Bytes
Contents
#!/usr/bin/env ruby require 'optparse' require 'shiny_wookie' $stdout.sync = true amount = 1 options = OptionParser.new do |o| o.banner = "Usage: shiny_wookie [options] \n\n" o.on("-a", "--amount X", "generate X documents") do |k| amount = k.to_i end o.on('-h', "--help", "show this help") { puts o; exit } end begin args = options.parse! documents = ShinyWookie::generate_documents amount documents.each_with_index do |document, index| document.write_to_file :prefix => "cv_", :name => Time.now.strftime("%Y_%m_%d_%s"), :suffix => "_#{index}" end rescue OptionParser::MissingArgument puts "I don't understand what you mean :-(" puts puts options end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
shiny_wookie-0.0.2 | bin/shiny_wookie |
shiny_wookie-0.0.1 | bin/shiny_wookie |