sccnv

Converts data in different formats.

Description

sccnv reads input given in a supported format, converts the content to another format and writes the output. Use the command-line option format-list for a list of supported formats.

Formats

Different formats are supported for input and output files.

Name

Description

Input

Output

arclink

Arclink XML

X

X

bson

X

X

bson-json

X

csv

comma-separated values

X

hyp71sum2k

Hypo71 format

X

ims10

X

json

JSON format

X

X

qml1.2

QuakeML format

X

qml1.2rt

QuakeML real time (RT) format

X

scdm0.51

X

X

trunk

SeisComP XML (SCML) - SCML API

X

X

Examples

  1. Print the list of supported formats:

    $ sccnv --format-list
    
  2. Convert an event parameter file in SCML format to QuakeML and store the content in a file:

    $ sccnv -i seiscomp.xml -o qml1.2:quakeml.xml
    
  3. Convert an inventory file in Arclink XML format to SCML and store the content in a file:

    $ sccnv -i arclink:Package_inventory.xml -o inventory.sc.xml
    
  4. Convert an event parameter file in SCML format to ims1.0 and store the content in a file:

    $ sccnv -i trunk:event.xml -o ims10:event.ims
    

Command-line

sccnv -i format:file -o format:file

sccnv reads the input given in a supported format, converts the content and writes the output in another format. Use the option format-list for a list of supported formats.

Generic

-h, --help

show help message.

-V, --version

show version information

Verbosity

-v, --v

Increase verbosity level (may be repeated, eg. -vv)

--debug

Debug mode: –verbosity=4 –console=1

Formats

--format-list

List all supported formats

Input

-i, --input arg

Input stream [format:][file], default: trunk:-

Output

-o, --output arg

Output stream [format:][file], default trunk:-

-f, --formatted

Use formatted output

--indent arg

Formatted line indent. Default: 2