caius maximilianus a écrit:
Pour les cartes c'est très rapide...pour les pions impossibles de faire démarrer le truc (si quelqu'un y arrive je suis preneur d'explication).
Pour les pions j'avais envoyé à l'auteur de l'extension une peite doc, il doit encore la vérifier et l'intégrer dans son manuel.
En gros tu crées un pion 'vide', puis des éléments, tu leur assigne des ID's dans inkscape, puis tu utilise un fichier csv qui liste le contenu de chaque pion.
Voici un copier coller de ma doc, mais c'est en anglais :
General structure
-----------------
[header]
[record]
...
[record]
[empty record]
[header]
[record]
...
[record]
[end of file]
Each line in the file is a 'record' that contains a series of values, or 'fields' separated by a comma.
All records must have the same number of fields for the csv file to be valid.
It is possible to define several recordsets in a single csv file. in that case, new header records must be preceded by an empty record.
[header] record
---------------
[name],[+][@][field][>],[+][@][field][>],...,[+][@][field][>]
The header record defines the relation between the inkscape document and the values in the csv file.
The first field names the record set, for reference. This name should not match any 'id' property of any object in the inkscape file.
Each field in a header records contain a name. That name should match the 'id' property of the object to affect in the inkscape document.
Caution : the 'id' should match a single object, not a group of objects.(usually it will be a boundary frame, which will be included in a group with the objects to replicate.)
If the object is a text object, values of the following records will replace the text content.
If the object is a drawing object, the group containing the object ID'ed in the field will be replicated.
Note : When looking for parts of counters (ie the IDs) the part after "-" in the ID is ignored. This is used to get the shadow effect on some counter values, because an ID in the SVG need to be unique, so to get the same text set for both the white and black value text they have the same ID-prefix, but different names after the dash : text objects with IDs move-fg and move-shadow will both be updated with the content of the 'move' field. It should only work one way, ie the title in the CSV file must be move, but there can be different move-* names in the SVG file.
[+] : The + prefix indicates that the drawing object ID'ed in the field must be copied with the group it is contained in. This is the default behaviour if no prefix is added.
[@] : The @ prefix indicates that the drawing object ID'ed in the field must not be copied with the group it is contained in.
[>] : The > suffix indicates that the drawing object should be copied to the counter back side as well (for double-sided counters).
[record] record
---------------
[num],[value],[value],...,[value]
OR
[KEYWORD]
A record can either contain value or a keyword.
When containing values, the first value must be either nothing or an integer. If empty, only one copy of the record will be created in the inkscape document. If an integer, that many copies of the record will be created in the inkscape document.
Note : When there is something other than a number or an empty cell in the leftmost column it is corrently (0.93) treated as a new header, expecting counter values to follow on rows below. This form is deprecated, should not be used, and may not be supported in future releases.
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).
Keywords : the following keywords can be used instead of a regular record. keywords must be in UPPERCASE and be the only content in that record.
ENDBOX : When you have a layer in the inkscape document named 'countersheet_layout' dictating the layout of the counters on the sheet you can put ENDBOX on a row in the CSV file to say that it should skip the rest of the current layout area and start filling the next one (ie if there is room for 20 counters in a rectangle in the countersheet_layout, but you only want 18 for some reason). Of course an alternative would be to fill out with some empty dummy counters.
(no other keywords yet).
[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.