[Scribus] Scripter play with frames
Gregory Pittman
gpittman
Sat Mar 4 20:54:16 CET 2006
Here is a beginning script for frames analysis: frameslist.py.
Just so you know what to expect from it, all this script does is take
the current document, and make a list of the text and image frames, page
by page, generating a file called 'temp.txt', which you can either view
with a text editor or 'less' or 'cat' for its contents. For the text
frames, it also gets the contents and adds that to the file after the
frame name. Alternatively you could make a new page or document in
Scribus (since you're there already) and load into a text frame.
Attached are 3 items: 1) the script, 2) an example from running the
script on a 9-page picture album (text frames show the file names), and
3) an example from running the script on a one-page medical-related
newsletter I made up some time ago (info freely available on PubMed +
annotations, in case you wondered).
One thing I see with the second example output file (temp.txt) is that
internal Scribus carriage returns are sent out as Ctrl-M, but when this
is imported back to Scribus it does not make a carriage return (does not
show up as anything). I made carriage returns in Python with '\n'.
Greg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: frameslist.py
Type: text/x-python
Size: 782 bytes
Desc: not available
Url : http://nashi.altmuehlnet.de/pipermail/scribus/attachments/20060304/ee638b20/attachment.py
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: temp1.txt
Url: http://nashi.altmuehlnet.de/pipermail/scribus/attachments/20060304/ee638b20/attachment.txt
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: temp.txt
Url: http://nashi.altmuehlnet.de/pipermail/scribus/attachments/20060304/ee638b20/attachment-0001.txt
More information about the scribus
mailing list