[Scribus] Tabs with dotted lines, mail-merge
Mon Sep 13 07:54:13 CEST 2004
On Mon, 2004-09-13 at 13:04, Dylan VanHerpen wrote:
> Also, is there a way (Python plug in) to do mail-merge?
Using the Python plugin, yes sure. I have "write a mail merge script" on
my to-do list. Unfortunately it's a very long to-do list. To get it
going really nicely I'll need PDF export support in the scripter, and
while I'm game to try to add it I don't know when I'll be able to.
That's assuming nobody else beats me too it of course ;-)
In the meantime you can always mail merge to individual .sla files,
which gets you half-way. I guess a way of calling scribus from the
command line to output PS or PDF would do the trick too, but it's going
easier to extend the scripter for PDF export than to make that
The general approach I'd take is to put every element you want to be a
field (ie to be replaced with dynamic data) in a separate text frame and
give it a unique and recognisable name and a suitable style. I'd apply
the style to the frame, not the text inside it.
I'd then write a script that connects to the data source (tip: the 'csv'
module in Python 2.3 is a handy time-saver if you're not using a full
RDBMS), calls SetText on each item to be replaced, and saves the file
with a new name.
It shouldn't be a particularly hard job to do the script, but it won't
be useful to me until I can use PS output, EPS export, or preferably PDF
export from the scripter. My current reporting solution - coding Python
scripts that use ReportLab for PDF output - is much harder work for each
report, but very very smooth after the work is done, so I don't have a
desperate need for this. (I do really, really wish RL knew how to subset
fonts our output them as outlines like Scribus, though.)
I'm happy to help out at this, but don't currently have time to do it
from scratch. This doesn't mean I won't do it anyway ;-) as I'm stupid
like that, but I can't promise anything.
I may be on IRC this evening (West Australian time, ie +0800 GMT).
More information about the scribus