Shipyard file format

 

Shipyard file format

Character encoding

A character encoding can be specified similar to PEP 0263 using:

# -*- coding: <encoding name> -*-

in the first line. # is replaced with the actual comment mark.

More precisely, the first line must match the regular expression:

^#.*coding[:=]\s*([-\w.]+)

Again # is replaced by the actual comment mark. The first group of this expression is then interpreted as encoding name.

Data set

A data set consists of zero or more records separated by one or more empty lines.

Comment

Lines starting with the comment mark (default: #) are ignored. Comments can be used in or between records.

Record

A record consists of one or more fields

Field

A field is a line that has the form:

key: value
key is a string that
  • doesn’t contain a colon
  • doesn’t start with the comment mark
  • doesn’t start with the continuation mark

value is an arbitrary string. It can span multiple line using continuation marks.

Continuation

If a line starts with the continuation mark (default: ” ” [one blank]) it gets appended to the preceding line, with the continuation mark removed.