- opts.on("-h", "--help"){ RDoc::usage(0, 'Synopsis', 'Usage') }
- opts.on("-w","--wdoor") { $wdoor=true }
- opts.parse(ARGV) rescue RDoc::usage(1, 'Synopsis', 'Usage')
+ opts.banner = "Usage: mk_html [OPTIONS]"
+ opts.on("--footer filename", String, "Insert contents of the filename at the bottom of a genrated page") do |filename|
+ unless File.exist?(filename)
+ $stderr.puts "File not found: %s" % [filename]
+ raise
+ end
+ $footer_content = File.open(filename).read
+ end
+ opts.on("-w","--wdoor", "adopt a wdoor style") { $wdoor=true }
+ opts.on_tail("-h", "--help", "show this message") do
+ puts opts
+ exit
+ end
+ begin
+ opts.parse(ARGV)
+ rescue
+ puts opts
+ exit -1
+ end