[scribus-dev] a couple of new scripter commands
Gregory Pittman
gpittman at iglou.com
Mon Jan 30 03:45:30 UTC 2012
Something I mused about today was the idea that, separate from how
master pages work, one might want to make a copy of an object to a
number of pages, maybe all, maybe odd pages, maybe a list of pages.
So I was going to see if I could write a script for this. It turns out
there are not sufficient commands to do this. About the closest is
duplicateObject(), but this makes a single copy on top of the original.
I set about making 2 new commands, copyObject() and pasteObject(), each
of which is a modified version of duplicateObject(). I've got them
working, at least for a single selected object, not multiple objects,
and not groups (have to work on that issue -- more swimming around the
plugin).
The concept as I envisioned it would work thusly in a script:
Test for document and a selected object (maybe have to test for a single
selected object).
copyObject().
Value dialog for keyword (all, odd, even) or list of page numbers.
Parse the value(s).
use gotoPage().
pasteObject().
Loop as needed, and useful to skip the object's original page (if 'all'
is specified, for example).
I wanted to see if anyone else felt this was of general interest,
perhaps using these commands for other purposes, in other ways.
Greg
More information about the scribus-dev
mailing list