bin/asciibinder in ascii_binder-0.1.15.1 vs bin/asciibinder in ascii_binder-0.1.15.2

- old
+ new

@@ -131,10 +131,11 @@ EOF opt :all_branches, "Instead of building only the current working branch, build all branches", :default => false opt :distro, "Instead of building all distros, build branches only for the specified distro.", :default => '' opt :page, "Build only the specified page for all distros and only the current working branch.", :default => '' opt :log_level, "Set the logging output level for this operation.", :default => 'warn' + opt :toc_depth, "Maximum depth of topics allowed. Use 0 for infinite depth.", :default => 3 conflicts :distro, :page end when "create" Trollop::options do banner <<-EOF @@ -205,10 +206,11 @@ Options: EOF opt :site, "Instead of packaging every docs site, package the specified site only.", :default => '' opt :log_level, "Set the logging output level for this operation.", :default => 'warn' + opt :toc_depth, "Maximum depth of topics allowed. Use 0 for infinite depth.", :default => 3 end when "help" Trollop::educate when "version" puts AsciiBinder::VERSION @@ -271,9 +273,16 @@ unless log_levels.has_key?(user_log_level) Trollop::die "log_level value '#{cmd_opts[:log_level]}' is not recognized. Legal values are " + log_levels.keys.map{ |lvl| "'#{lvl.to_s}'" }.join(', ') end end set_log_level(user_log_level) + +# Set the depth level +user_depth = 3 +unless cmd_opts.nil? or cmd_opts[:toc_depth].nil? + user_depth = cmd_opts[:toc_depth].to_i +end +set_depth(user_depth) # Cloning? Time to try it. if cmd == 'clone' puts "Cloning #{cmd_opts[:giturl]} to #{docs_basedir}"