Discussion:
[scribus] Importing OpenOffice ODT files using Scribus API
Christophe Amerijckx
2011-03-31 12:12:10 UTC
Permalink
Hi,

There is a way in Scribus to import an OpenOffice ODT file in a text
frame using GetText when a text frame is selected.

For some reason, I would like to automate the import of several
OpenOffice ODT files inside a scribus document using the Scribus API.
However, I didn't find any command in the API allowing me to do what the
GetText is doing (I tried importPage but it seems it doesn't support the
ODT file since Scribus crashes...).

Any hint?

Thanks for your help,

Christophe
a.l.e
2011-03-31 13:13:18 UTC
Permalink
hi christophe
Post by Christophe Amerijckx
There is a way in Scribus to import an OpenOffice ODT file in a text
frame using GetText when a text frame is selected.
For some reason, I would like to automate the import of several
OpenOffice ODT files inside a scribus document using the Scribus API.
However, I didn't find any command in the API allowing me to do what
the GetText is doing (I tried importPage but it seems it doesn't
support the ODT file since Scribus crashes...).
i guess that importPage is for importing pages from a .sla...

getText returns the text in the frame...

i wonder if there is already a loadText()... can't check it, now...

it's not probably hard to add... but somebody has to do it :-)

ciao
a.l.e
Christophe Amerijckx
2011-04-01 12:19:30 UTC
Permalink
Hi,

unfortunately, there is no such command in the API and I have no idea
how to add such a command. I am afraid it would take me way too much
time to try implementing such a thing.

Just a few word about the reason I would need this. Every period of
time, we have to write a report. The first part doesn't change that
much. The second part part consists of hundred of sheets describing what
we have in stock. Part of these sheets are coming from ODT documents
(describing the product), other parts are characteristics, others are
numbers coming from a database. I've been able to generate everything
automatically with scripts except the import of the ODT file and having
to do it manually would be a pity...

Thanks,

Christophe
Post by a.l.e
hi christophe
Post by Christophe Amerijckx
There is a way in Scribus to import an OpenOffice ODT file in a text
frame using GetText when a text frame is selected.
For some reason, I would like to automate the import of several
OpenOffice ODT files inside a scribus document using the Scribus API.
However, I didn't find any command in the API allowing me to do what
the GetText is doing (I tried importPage but it seems it doesn't
support the ODT file since Scribus crashes...).
i guess that importPage is for importing pages from a .sla...
getText returns the text in the frame...
i wonder if there is already a loadText()... can't check it, now...
it's not probably hard to add... but somebody has to do it :-)
ciao
a.l.e
_______________________________________________
scribus mailing list
scribus at lists.scribus.net
Use http://lists.scribus.net/mailman/listinfo/scribus to unsubscribe or edit your options.
Scribus Forums are available at http://forums.scribus.net
Notice: mailing lists will be migrated to a new host soon.
There may be downtime. Please use forums if the list is not available.
Gregory Pittman
2011-04-01 13:26:48 UTC
Permalink
Post by Christophe Amerijckx
Hi,
unfortunately, there is no such command in the API and I have no idea
how to add such a command. I am afraid it would take me way too much
time to try implementing such a thing.
Just a few word about the reason I would need this. Every period of
time, we have to write a report. The first part doesn't change that
much. The second part part consists of hundred of sheets describing what
we have in stock. Part of these sheets are coming from ODT documents
(describing the product), other parts are characteristics, others are
numbers coming from a database. I've been able to generate everything
automatically with scripts except the import of the ODT file and having
to do it manually would be a pity...
As it is now, there is a whole plugin devoted to ODT import. The answer
would probably come from Scripter tapping into that importer rather than
writing something new.

Just to see what would happen trying to import an ODT file in Scripter I
tried it out, and it's quite a mess.

Greg
John Culleton
2011-04-01 13:33:46 UTC
Permalink
Post by Christophe Amerijckx
Hi,
unfortunately, there is no such command in the API and I have no
idea how to add such a command. I am afraid it would take me way
too much time to try implementing such a thing.
Just a few word about the reason I would need this. Every period
of time, we have to write a report. The first part doesn't change
that much. The second part part consists of hundred of sheets
describing what we have in stock. Part of these sheets are coming
from ODT documents (describing the product), other parts are
characteristics, others are numbers coming from a database. I've
been able to generate everything automatically with scripts
except the import of the ODT file and having to do it manually
would be a pity...
May I suggest saving the ODT file as text from OO Writer, Inputting it
ino text frames, and then modifying it as needed?
--
John Culleton
Create Book Covers with Scribus:
http://www.booklocker.com/books/4055.html
Christophe Amerijckx
2011-04-01 13:39:34 UTC
Permalink
Post by John Culleton
Post by Christophe Amerijckx
Hi,
unfortunately, there is no such command in the API and I have no
idea how to add such a command. I am afraid it would take me way
too much time to try implementing such a thing.
Just a few word about the reason I would need this. Every period
of time, we have to write a report. The first part doesn't change
that much. The second part part consists of hundred of sheets
describing what we have in stock. Part of these sheets are coming
from ODT documents (describing the product), other parts are
characteristics, others are numbers coming from a database. I've
been able to generate everything automatically with scripts
except the import of the ODT file and having to do it manually
would be a pity...
May I suggest saving the ODT file as text from OO Writer, Inputting it
ino text frames, and then modifying it as needed?
Yes, that's something I already thought about. However, in that case I
would loose the text formatting (colors, bold, italic,...).
Barry McKenna
2011-04-01 18:48:20 UTC
Permalink
Post by Christophe Amerijckx
Post by John Culleton
Post by Christophe Amerijckx
Hi,
unfortunately, there is no such command in the API and I
have no
idea how to add such a command. I am afraid it would
take me way
too much time to try implementing such a thing.
Just a few word about the reason I would need this.
Every period
of time, we have to write a report. The first part
doesn't change
that much. The second part part consists of hundred of
sheets
describing what we have in stock. Part of these sheets
are coming
from ODT documents (describing the product), other parts
are
characteristics, others are numbers coming from a
database. I've
been able to generate everything automatically with scripts
except the import of the ODT file and having to do it
manually
would be a pity...
May I suggest saving the ODT file as text from OO Writer,
Inputting it
ino text frames, and then modifying it as needed?
Yes, that's something I already thought about. However, in
that case I would loose the text formatting (colors, bold,
italic,...).
Exactly! And that's the major benefit of being able to
import the .odt files as is into Scribus. That's a major
feature that means a lot to me.

Barry McKenna

Loading...