Sha256: 218b64ec24e7778733cde6591d666ce874c651ba3efe2c33f944db2e53fa29a3
Contents?: true
Size: 928 Bytes
Versions: 66
Compression:
Stored size: 928 Bytes
Contents
#!/usr/bin/env ruby $:.unshift(File.dirname(__FILE__) + "/../../lib") require 'git-style-binary/command' GitStyleBinary.command do short_desc "create a blog post" banner <<-EOS SYNOPSIS #{command.full_name} #{all_options_string} {content|STDIN} EOS opt :blog, "short name of the blog to use", :default => 'default' opt :category, "tag/category. specify multiple times for multiple categories", :type => String, :multi => true opt :title, "title for the post", :required => true, :type => String opt :type, "type of the content [html|xhtml|text]", :default => 'html', :type => String run do |command| command.die :type, "type must be one of [html|xhtml|text]" unless command.opts[:type] =~ /^(x?html|text)$/i puts "Subcommand name: #{command.name.inspect}" puts "Options: #{command.opts.inspect}" puts "Remaining arguments: #{command.argv.inspect}" end end
Version data entries
66 entries across 66 versions & 5 rubygems