tome-editor icon indicating copy to clipboard operation
tome-editor copied to clipboard

Feature request: Format specifiers for exported values

Open pgrimsehl opened this issue 7 years ago • 0 comments

Hi,

when exporting field values, we cannot not differentiate between value types, especially between strings and numbers.

In the .texportv file we can either define something like

$FIELD_ID$ = $FIELD_VALUE$

or

$FIELD_ID$ = "$FIELD_VALUE$"

This may lead to problems when the interpreter of the exported data determines the value type based on the presence of such quotes.

Possible solutions could be:

  1. Add a parameter / attribute to the export template to define the character used to enclose strings (e.g. <StringDelimiter>"</StringDelimiter>)
  2. Add a more flexible system to encompass formatting of other basic types, for example using printf like syntax:
<StringFormat>"%s"</StringFormat>
<IntegerFormat>"%03i"</IntegerFormat>
<RealFormat>"%2.8f"</RealFormat>
<ReferenceFormat>#%s</ReferenceFormat>

pgrimsehl avatar Feb 19 '18 10:02 pgrimsehl