shakemap.coremods.base

class shakemap.coremods.base.CoreModule(eventid)[source]

Bases: abc.ABC

Base class for any module in coremods which gets called by the shake program.

Instantiate a CoreModule class with an event ID.

command_name = ''
targets = None
dependencies = None
configs = None
abstract execute()[source]
parseArgs(arglist)[source]

This is the default parseArgs which is sufficient for most modules. It will respond to ‘-h’ or ‘–help’ but nothing else. If a module needs to accept command line arguments, it will need to override this module.

writeContents()[source]
class shakemap.coremods.base.Contents(page_title, page_slug, eventid)[source]

Bases: object

Helper class for creating and updating the contents.xml file.

addFile(key, title, caption, filename, mime_type)[source]
readContents(contents_file)[source]
writeContents()[source]