lib/smallcage/application.rb in smallcage-0.1.8 vs lib/smallcage/application.rb in smallcage-0.1.9

- old
+ new

@@ -1,8 +1,8 @@ class SmallCage::Application require 'optparse' - VERSION_NOTE = "SmallCage #{SmallCage::VERSION::STRING} - Lightweight CMS Package." + VERSION_NOTE = "SmallCage #{SmallCage::VERSION::STRING} - simple website generator" @@signal_handlers = nil def self.init_signal_handlers @@signal_handlers = { @@ -51,10 +51,11 @@ clean [path] Remove files generated from *.smc source. server [path] [port] Start HTTP server. auto [path] [port] Start auto update server. import [name|uri] Import project. export [path] [outputpath] Export project. + uri [path] Print URIs. manifest [path] Generate Manifest.html file. Options are: BANNER return parser @@ -87,10 +88,11 @@ :server => "smc server [path] [port]\n", :auto => "smc auto [path] [port]\n", :import => "smc import [name|uri]", :export => "smc export [path] [outputpath]", :help => "smc help [command]\n", + :uri => "smc uri [path]\n", } banners.each do |k,v| parsers[k] = OptionParser.new do |cp| cp.banner = "Usage: " + v @@ -149,9 +151,12 @@ @options[:to] ||= "." elsif @options[:command] == :export @options[:path] = ARGV.shift @options[:path] ||= "." @options[:out] = ARGV.shift + elsif @options[:command] == :uri + @options[:path] = ARGV.shift + @options[:path] ||= "." elsif @options[:command] == :manifest @options[:path] = ARGV.shift @options[:path] ||= "." elsif @options[:command] == :clean @options[:path] = ARGV.shift