lib/asciibook/command.rb in asciibook-0.0.4 vs lib/asciibook/command.rb in asciibook-0.0.5

- old
+ new

@@ -36,10 +36,11 @@ dir = File.dirname source filename = File.basename source File.open(File.join(dir, 'asciibook.yml'), 'w') do |file| file.write <<~EOF source: #{filename} + # formats: # - html # - pdf # - epub # - mobi @@ -64,10 +65,10 @@ c.option :formats, '--format FORMAT1[,FORMAT2[,FORMAT3...]]', Array, 'Formats you want to build, allow: html,pdf,epub,mobi, default is all.' c.option :theme_dir, '--theme-dir DIR', 'Theme dir.' c.option :template_dir, '--template-dir DIR', 'Template dir.' c.option :dest_dir, '--dest-dir DIR', 'Destination dir.' c.option :page_level, '--page-level NUM', Integer, 'Page split base on section level, default is 1.' - c.option :plugins, '-r', '--require PLUGIN1[,PLUGIN2[,PLUGIN3...]]', Array, 'Require plugins' + c.option :plugins, '--plugin PLUGIN1[,PLUGIN2[,PLUGIN3...]]', Array, 'Require ruby gem or ruby script plugin.' c.action do |args, options| source = args[0] || '.' if File.directory?(source) config_options = YAML.safe_load(File.read(File.join(source, 'asciibook.yml'))).reduce({}) do |hash, (key, value)| hash[key.to_sym] = %w(source theme_dir template_dir dest_dir).include?(key) ? File.join(source, value) : value