compact, csv
Compact and CSV format.
The csv writer is equivalent to compact, but supports different defaults.
Each section is printed on a single line. If no option is specified, the output has the form:
section|key1=val1| ... |keyN=valN
Metadata tags are printed in the corresponding "format" or "stream" section. A metadata tag key, if printed, is prefixed by the string "tag:".
The description of the accepted options follows.
- 'item_sep, s'
-
Specify the character to use for separating fields in the output line. It must be a single printable character, it is "|" by default ("," for the
csvwriter). - 'nokey, nk'
-
If set to 1 specify not to print the key of each field. Its default value is 0 (1 for the
csvwriter). - 'escape, e'
-
Set the escape mode to use, default to "c" ("csv" for the
csvwriter).It can assume one of the following values:
- 'c'
-
Perform C-like escaping. Strings containing a newline ('\n'), carriage return ('\r'), a tab ('\t'), a form feed ('\f'), the escaping character ('\') or the item separator character SEP are escaped using C-like fashioned escaping, so that a newline is converted to the sequence '\n', a carriage return to '\r', '\' to '\\' and the separator SEP is converted to '\SEP'.
- 'csv'
-
Perform CSV-like escaping, as described in RFC4180. Strings containing a newline ('\n'), a carriage return ('\r'), a double quote ('"'), or SEP are enclosed in double-quotes.
- 'none'
-
Perform no escaping.
- 'print_section, p'
-
Print the section name at the beginning of each line if the value is
1, disable it with value set to0. Default value is1.