Extracts channels from inventory.
invextr extracts or removes networks, stations and channels from an inventory XML file. It takes basically three important parameters:
whereas the output file defaults to stdout and the input file to stdin if not given.
A channel ID is a simple string that is matched against the final channel ID in the inventory. This final channel ID is constructed by joining the codes of all stages with a dot where the stages are network, station, location and channel.
Suppose an inventory with network GE, a station MORC and several channels:
network GE
station MORC
location __
channel BHZ ID: GE.MORC..BHZ
channel BHN ID: GE.MORC..BHN
channel BHE ID: GE.MORC..BHE
channel LHZ ID: GE.MORC..LHZ
channel LHN ID: GE.MORC..LHN
channel LHE ID: GE.MORC..LHE
The IDs are matched against what is passed with --chans.
invextr --chans "GE*" inv.xml
Nothing is filtered because GE* matches all available IDs.
invextr --chans "*MORC*" inv.xml
Nothing is filtered again because MORC matches all available IDs.
invextr --chans "GE.MORC" inv.xml
Everything is filtered because GE.MORC does not match with any ID. To make it work, an asterisk needs to be appended: GE.MORC* or GE.MORC.*.
To extract all vertical components, use:
invextr --chans "*Z" inv.xml
To extract BHN and LHZ, use:
invextr --chans "*BHN,*LHZ" inv.xml
To remove all HH and SH channels, use:
invextr --rm --chans "*HH?,*SH?" inv.xml
invextr inherits global options.
invextr [OPTIONS] [input=stdin] [output=stdout]
show help message.
show version information
Use alternative configuration file. When this option is used the loading of all stages is disabled. Only the given configuration file is parsed and used. To use another name for the configuration create a symbolic link of the application or copy it, eg scautopick -> scautopick2.
Load given plugins.
Run as daemon. This means the application will fork itself and doesn't need to be started with &.
Verbosity level [0..4]. 0:quiet, 1:error, 2:warning, 3:info, 4:debug
Increase verbosity level (may be repeated, eg. -vv)
Quiet mode: no logging output
Limits the logging to a certain component. This option can be given more than once.
Use syslog logging back end. The output usually goes to /var/lib/messages.
Path to lock file.
Send log output to stdout.
Debug mode: --verbosity=4 --console=1
Use alternative log file.
A comma separated list of channel ids to extract which can contain wildcards.
Example: invextr --chans "GE.*.*.BHZ,GE.MORC.*.*" inv.xml
Removes all channels given with '--chans' instead of extracting them.
Example: invextr --rm --chans "GE.*" inv.xml
Enables formatted XML output.