Metadata file format

A metadata file is a human-readable text file based on the Debian control file format. The preferred file name is metadata.pegasus.txt, the preferred encoding is UTF-8 and the preferred line ending sequence is the standard line feed character (U+000A, "\n").

The file contains a list of entries, where each entry has a name and one or more lines of values. For example the following file produces 3 entries: the first one has 1 value, the second has 2 and the third one has 3.

name: single value

  value line 1
  value line 2

name: value line 1
  value line 2
  value line 3


The metadata file is read line by line, and each line is expected to match one of the following four cases:


Note: key and value must not be empty after removing any leading and trailing whitespace characters

Text merging

After reading the file successfully, you will have a list of entries, each with a name and a list of values with at least one item in it. These entries can be used as-is to represent single values or list of values. However in case the values represent the lines of a flowing text, you might want to merge them together; if such text is expected to be a long text intended for display, this should be done with regards to the following rules: