[scribus] scripting functions

Eric Druid eric.druid at gmail.com
Tue Aug 12 10:28:18 CEST 2008


On Mon, Aug 11, 2008 at 15:26, Gregory Pittman <gpittman at iglou.com> wrote:
> Eric Druid wrote:
>>
>> Hello!
>>
>> I'm trying to script scribus to take an XML-file (a songbook) and
>> display it in something like printable manner. The idea is that the
>> script does the majority of the work and then I only need to tweak the
>> result to my liking.
>>
>>
>
> We are in the midst of an upgrade to Scripter, so-called Scripter-ng. This
> promises to have an increased number of functions, but will probably not be
> back-ported to the 1.3.3.x series.

Is there an unstable linux release with the new scripter available somewhere?

>> In the building of this script I have found some functunality in the
>> scripting language I am missing:
>>
>> getPage([name])
>> Returns the page the object is on (to build an index after everything
>> has been tweaked.
>>
>
> There is currentPage(), which returns the number of the page you are
> currently working on, therefore should do what you need.

Unfortunately currentPage() only returns the page selected when
starting the script. The page selection does not change when I call
the selectObject(name) function.

>> redrawObject([name])
>> redraws the object (Or something else that lets me update the
>> information retrieved by textOverflows)
>>
>
> There is redrawAll(), which should do this. Not sure what value there is to
> redrawObject alone.

I tried using redrawAll() but it didn't change the outcome of
textOverflows(). Perhaps redrawAll() starts a new thread to redraw
everything and my next textOverflows() call comes too soon?

/Eric Druid




More information about the scribus mailing list