Sha256: 33d5b4e45c851c5796dd3a40e7e0624736dd2442b55da9aff3748049f47e867a

Contents?: true

Size: 1.81 KB

Versions: 18

Compression:

Stored size: 1.81 KB

Contents

# Other traject command-line commands

The traject command line supporst a few other miscellaneous commands with
the "-x command" switch. The usual traject command line is actually
the `process` command, `traject -x process ...` is the same as leaving out
the `-x process`.

## Commit

`traject -x commit` will send a 'commit' message to the Solr server
specified in setting `solr.url`.  Other parts of configuration will
be ignored, but don't hurt.

    traject -x commit -s solr.url=http://some.com/solr

Or with a config file that includes a solr.url setting:

    traject -x commit -c config_file.rb

## marcout

The `marcout` command will skip all processing/mapping, and simply
serialize marc out to a file stream.

This is mainly useful when you're using a custom reader to read
marc from a database or something, but could also be used to
convert marc from one format to another or something.

Will write to stdout, or set the `output_file` setting (`-o` shortcut).

Set the `marcout.type` setting to 'xml' or 'binary' for type of output.
Or to `human` for human readable display of marc (that is not meant for
machine readability, but can be good for manual diagnostics.)

If outputing type binary, setting `marcout.allow_oversized` to
true or false (boolean or string), to pass that to the MARC::Writer.
If set to true, then oversized MARC records can still be serialized,
with length bytes zero'd out -- technically illegal, but can
be read by MARC::Reader in permissive mode. 

As the standard Marc4JReader always convert to UTF8,
output will always be in UTF8. For standard readeres, you
do need to set the `marc_source.type` setting to XML for xml input
using the standard MARC readers.

~~~bash
traject -x marcout somefile.marc -o output.xml -s marcout.type=xml
traject -x marcout -s marc_source.type=xml somefile.xml -c configuration.rb
~~~

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
traject-1.1.0 doc/other_commands.md
traject-1.0.0 doc/other_commands.md
traject-1.0.0.beta.7 doc/other_commands.md
traject-1.0.0.beta.5 doc/other_commands.md
traject-1.0.0.beta.4 doc/other_commands.md
traject-1.0.0.beta.3 doc/other_commands.md
traject-1.0.0.beta.2 doc/other_commands.md
traject-1.0.0.beta.1 doc/other_commands.md
traject-0.17.0 doc/other_commands.md
traject-0.16.0 doc/other_commands.md
traject-0.15.0 doc/other_commands.md
traject-0.14.1 doc/other_commands.md
traject-0.13.2 doc/other_commands.md
traject-0.13.1 doc/other_commands.md
traject-0.13.0 doc/other_commands.md
traject-0.12.0 doc/other_commands.md
traject-0.11.0 doc/other_commands.md
traject-0.10.0 doc/other_commands.md