Method: Traject::CommandLine#create_slop!

Defined in:
lib/traject/command_line.rb

#create_slop!Object



237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
# File 'lib/traject/command_line.rb', line 237

def create_slop!
  return Slop.new(:strict => true) do
    banner "traject [options] -c configuration.rb [-c config2.rb] file.mrc"

    on 'v', 'version', "print version information to stderr"
    on 'd', 'debug', "Include debug log, -s log.level=debug"
    on 'h', 'help', "print usage information to stderr"
    on 'c', 'conf', 'configuration file path (repeatable)', :argument => true, :as => Array
    on :i, 'indexer', "Traject indexer class name or shortcut", :argument => true, default: "marc"
    on :s, :setting, "settings: `-s key=value` (repeatable)", :argument => true, :as => Array
    on :r, :reader, "Set reader class, shortcut for -s reader_class_name=", :argument => true
    on :o, "output_file", "output file for Writer classes that write to files", :argument => true
    on :w, :writer, "Set writer class, shortcut for -s writer_class_name=", :argument => true
    on :u, :solr, "Set solr url, shortcut for -s solr.url=", :argument => true
    on :t, :marc_type, "xml, json or binary. shortcut for -s marc_source.type=", :argument => true
    on :I, "load_path", "append paths to ruby $LOAD_PATH", :argument => true, :as => Array, :delimiter => ":"

    on :x, "command", "alternate traject command: process (default); marcout; commit", :argument => true, :default => "process"

    on "stdin", "read input from stdin"
    on "debug-mode", "debug logging, single threaded, output human readable hashes"
  end
end