[scribus] Shifting page objects by script

Gregory Pittman gpittman at iglou.com
Fri Oct 12 12:06:22 UTC 2012

On 10/12/2012 03:18 AM, Ian "Witty" Whitfield wrote:
> On 10/12/2012 08:12 AM, Greg wrote:
>> Here is a wiki page with a script for shifting all page objects, which
>> you might need to do when you insert a page in the middle of a Double
>> Sided layout.
>> http://wiki.scribus.net/canvas/Shifting_All_Page_Objects
>> There are of course various mods one can make to accomplish other
>> goals. As written, the script only shifts the objects right or left,
>> not up or down.
>> Greg
> Hi Greg
> This sounds very promising indeed and I think could cure the problem I
> brought up!!
> I've never used scripts so would need a basic 'How to' if you don't
> mind. My only comment would be to know if it's possible to make the
> script work from the page you start it on right to the end of the document?
It probably would be possible to add a dialog to enter a series of pages 
to be altered, for example, enter '5 7 9 11 13' and so on, since this 
list of formerly left pages would need the same shift and direction, 
then repeat the script for the former right pages affected.

Trying to incorporate into Scribus is more challenging, and would 
require some logic as a.l.e suggests to detect a mismatch between master 
pages and content pages. I've noticed, though, that there can be 
glitches in the reassignment of Master Pages after a new page is 
inserted somewhere.

To use the script I wrote you need to copy/paste the lines of the script 
into a plain text editor, then save as a file with a .py extension. You 
might run one of the included scripts in Scribus just to see how they 
run. Then click Script > Execute Script and find your saved script. Once 
you have run the script, you can find it again with Script > Recent Scripts.


More information about the scribus mailing list