[scribus] identifying grouped object with the scripter
big.bros at free.fr
Thu Apr 23 17:50:47 UTC 2015
You're right : I'm trying to make a script to automate the making of a
On one hand, i have a csv file with all the needed informations
On the other, i'd like to have a scribus file defining some named groups
of objects i'd use as template.
As i'm working on it on 3 differents computers (2 on windows), it's not
very easy to install the 1.5 (compilation on windows... As i mainly use
python, i'm not very fluent with compilation) now but i'm waiting it
At first glance, I'd prefere to avoid working with xml but the 1.4 API
doesn't deal easily with groups (i could be careful with the naming of
my objects to make up for it) and i can't find how to duplicate an
object and put it on another page (as there are hundreds of products, I
need tens of pages :-) ).
If I can't do that, i simply can't use the scripter so i have to give a
second glance :-)
At second glance, the xml file is rather easy to understand (with the
doc) and i need very few properties.
Groups can be identified and putting an object on a page seems rather
easy (not sure, we'll see).
As it is just a matter of copy and paste (i don't create objects which
is not a copy of another), i thing this may be possible without too much
headache (just change the name, position... ?).
So, when the 1.5 will be out, i'll definitely give it a chance but as i
don't know when this will happen, i'm looking at the xml file too.
On 23/04/2015 14:56, Gregory Pittman wrote:
> On 04/23/2015 05:26 AM, big.bros at free.fr wrote:
>> I'm trying to generate a document from a scribus template and a csv file (by duplicating objects
>> and setting values from the csv rows).
>> I've looked at the scribus sla format and it seems that i could realize my project by directly
>> playing with the xml file but this may lead to some surprises in the future.
>> A better way would probably be to do it with the scripter.
>> A first approach shows that it may not be too difficult that way.
>> Except for two problems :
>> - I can't find a way in the api to get grouped objects (getting the name of
>> the group in which is a named object or the name of all objects from a named group)
>> - when you duplicate an object, is there a way to put it on another page
> I'm a little uncertain how you're trying to do this. Are you using a script?
> In the upcoming release of 1.5.0, there are commands to separately copy
> and paste objects, which means you can copy, go to another page, then
> paste a copy.
> I agree that trying to do complex things by editing the XML is not the
> way to go.
> Scribus Mailing List: scribus at lists.scribus.net
> Edit your options or unsubscribe:
> See also:
More information about the scribus