92: def initialize
93: super( 'create', false )
94: self.short_desc = "Creates the basic directories and files for webgen."
95: self.description = CliUtils.format( "\nIf the global verbosity level is set to 0 or 1, the created files are listed." )
96: self.options = CmdParse::OptionParserWrapper.new do |opts|
97: opts.separator "Options:"
98: opts.on( '-t', '--template TEMPLATE', Webgen::WebSiteTemplate.entries.keys, 'Specify the template which should be used' ) {|@template|}
99: opts.on( '-s', '--style STYLE', Webgen::WebSiteStyle.entries.keys, 'Specify the style which should be used' ) {|@style|}
100: opts.separator ""
101: opts.separator "Arguments:"
102: opts.separator opts.summary_indent + "DIR: the base directory for the website"
103: opts.separator ""
104: opts.separator "Available templates and styles:"
105: opts.separator ""
106: opts.separator opts.summary_indent + "#{Color.bold( 'Templates' )}"
107: Webgen::WebSiteTemplate.entries.sort.each {|name, entry| CliUtils.dirinfo_output( opts, name, entry ) }
108: opts.separator opts.summary_indent + "#{Color.bold( 'Styles' )}"
109: Webgen::WebSiteStyle.entries.sort.each {|name, entry| CliUtils.dirinfo_output( opts, name, entry ) }
110: end
111: @template = 'default'
112: @style = 'default'
113: end