Beruflich Dokumente
Kultur Dokumente
------------------------------------------------------
Copyright 2009-2016 Eric Hanuise (ehanuise -at- fantasybel _dot_ net)
and Pelle Nilsson (perni -at- lysator _dot_ liu _dot_ se)
General structure
-----------------
[header]
[record]
...
[record]
[empty record]
[header]
[record]
...
[record]
[end of file]
[header]
--------
[background],[+][@][field][?][>],[+][@][field][?][>],...,[+][@][field][?][>]
The header record defines the relation between the inkscape document
templates and the values in the csv file. The first field if present
is the identifier of the template to use for the background, if any.
This is used only when all counters defined in recordset shall have
the same background, otherwise leave this header field empty. Each
other field in a header records contain a name. That name should match
the 'id' property of an object to affect in the inkscape document.
Note : When looking for parts of counters (ie the ids), standard globs
are used for matching. * matches one or more of any character,
? matches any single character. For instance for something to
apply to elements with id elem-a, elem-b, and elem-c, you can use
the glob elem-* (or in this case, equally, elem-?). You can also
use the * or ? in the beginning of middle. This is a change from
1.x versions of the countersheet effect where automatic matching
was attempted for ids containg dashes, but no such autoautomatic
matching is attempted now (you need to add "-*" at the end of
ids to get much the same effect, but now you have more control
and can avoid some problems that was caused by the old solution).
[+] : The + prefix indicates that the rectangle object id'ed in the
field must be copied with the group it is contained in. This is the
same behavior as for the background field.
[?] : The ? suffix indicates that the column is use to select if the
svg element with the given id should be included or not. If, and only
if, the cell in this column equals y or Y then that element is included.
It can be combined with the > suffix (put immediately after the ?) to
(not) include the same elements for the back of each counter.
[>] : The > suffix indicates that the drawing object should be copied
to the counter back side as well (for double-sided counters).
BACK : A headerfield containing the word BACK means that all parts
to the right of this column will be used to create the back side of the
counters in this group. Only counters for rows that also have BACK in
the field in this row will have a back side created, to make it possible
to mix single-sided and double-sided counters in the same group.
ID: The special header ID means that the value (if any) in this column
for each row specifies the id attribute to set for the group created
in the SVG output for that counter. It is also used as the filename
(after appending .png) when using the bitmap export feature.
[record] record
---------------
[num],[value],[value],...,[value]
OR
[KEYWORD]
The following values should match the fields defined in the header
record. Alphanumerical values should start and end with a " double
quote. (the parser tries to be smart about this, but whenever possible
use quotes).
ENDROW: Similar to ENDBOX, but only ends the current row. If there is
no room in the current box for another row the effect will be identical
to ENDBOX.
For [attribute] columns: Cells beginning with '<' mean that the value
is copied from the same attribute in the rectangle that has the id
following the '<' in the cell (ie '<foo' will copy the value from the
rectangle with id 'foo'). If the cell doest not start with '<' then the
contents of the cell will be used as is.
For text columns: Cells beginning with '<<' mean that the value is
read from the file named after the '<<' (ie '<<bar.txt' will use
the contents of the file bar.txt). The file contents will be
used exactly as if they had been typed into the cell itself,
except that new-lines in the file will be treated as new-lines.
[empty record]
--------------
This record should have only empty fields and is used to indicate the
parser that the next record will be a header record.
autonumber
----------
This is not in the CSV data. If you set the id of a text object in a
template in the SVG to autonumber every generated counter will have a
uniqe number starting from 1 inserted instead of the text in the
countersheet.