[scribus] Scribus Generator: turn your data in beautiful documents

ale rimoldi ale.comp_06 at xox.ch
Mon Mar 27 17:07:26 UTC 2017


hi greg

On 27/03/17 18:57, Gregory Pittman wrote:
> On 03/27/2017 10:16 AM, ale rimoldi wrote:
>> hi
>>
>>> I have used CSV files with Scribus in the past, and never bothered with
>>> LibreOffice or any spreadsheet program, since the whole point of CSV to
>>> me is that they're just comma separated values. I just used a text
>>> editor with lines of text separated by commas, and never had issues.
>>
>> yes, for your own entries typing CSV by hand might be a comfortable
>> solution.
>>
>> the format is pretty simple.
>>
>> but if you want to read "random" content generated by your users (like
>> journalists writing articles) you'd better use a tool that generates
>> valid CSV and read it with a CSV library.
>>
>> you never know where a "," a """, or even a "\" might be hiding...
> 
> If you open it in a text editor, I'm not sure where you think they might
> hide --


if you have a comma in your text, you have to put the matching field
between quotes.
you can quote every field or only the fields that need it. it's up to you.
if you have a " in your text, you have to escape it. but only if it's
between "".
beware of " that are at the beginning of your string...
if you have a \ inside of a " you also have to escape it: probably four
times: \\\\.

it's not that hard, but if your getting the content from a content
management system, you will prefer not to bother about those details and
use one of the many libraries for reading and writing CSV files.

if you're typing yourself a few fields (mostly names and numbers), you
can do it with a text editor. no worries.

ciao
a.l.e



More information about the scribus mailing list