Commit 37a7de79 authored by Sebastian Heimann's avatar Sebastian Heimann
Browse files

add event yaml export

parent 975d5b99
......@@ -606,9 +606,9 @@ def command_export(args):
def setup(parser):
'--type', dest='type', metavar='TYPE',
choices=('event', 'source', 'vector'),
choices=('event', 'event-yaml', 'source', 'vector'),
help='select type of objects to be exported. Choices: '
'"event" (default), "source", "vector".')
'"event" (default), "event-yaml", "source", "vector".')
'--parameters', dest='parameters', metavar='PLIST',
......@@ -796,6 +796,10 @@ def export(what, rundirs, type=None, pnames=None, filename=None):
ev = problem.get_source(x).pyrocko_event()
model.dump_events([ev], stream=out)
elif type == 'event-yaml':
ev = problem.get_source(x).pyrocko_event()
guts.dump_all([ev], stream=out)
raise GrondError('invalid argument: type=%s' % repr(type))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment