data.edit.mentor.modify

data.edit.mentor.modify is the interface by which external programs can alter the mentor edits for a station. For the specification and meanings of these edits see data.mentor.edit. Modification commands are read from standard input. Once all commands are read, the changes defined by all of them are made atomically with respect to locking (but not to failure, if one or more fail they are reported but the change proceeds anyway).

Command Line Usage

data.edit.mentor.modify [station]

Arguments

station

The station identifier code. For example 'brw'. Case insensitive.

Input

Input is a series of commands (one per line) of the form:

command,start,end,record,type,params,modified,author,notes

command

The action to be taken, either “add” or “remove”.

For add commands the following parameters specify the edit to add. For remove all parameters must be matched exactly except for the author and notes, which are optional and ignored.

start and end

The start and end of this edit in epoch time. If the field is null (zero length), then that parameter does not apply, so a null start with a valid end indicates all data up until (but excluding) the end time. Likewise a null end but a defined start is all data including and after the start. Both being defined is the half-open interval of time [start,end). Both null defines all time.

record

Record type this edit is applied to, may be null to apply to all records. May not contain more than one record type (that is represented by multiple lines).

type and params

modified

Time when this edit was last modified. Generally the current time.

author

String (initials) of the author of this edit. Optional for removal

notes

Notes about this edit. Optional for removal.

Example Usage

data.edit.mentor.generate.nepherrors sgp 2008:10 2008:20