[scribus] Python scripts
Gregory Pittman
gpittman at iglou.com
Wed Jul 29 02:00:35 UTC 2015
On 07/27/2015 07:35 PM, Kunda Loves Scribus wrote:
>>
>>
>>> Back to the topic of Python Scripts, I came across this repo on Github:
>>> https://github.com/thresherdj/robo-scribus
>>> "An python-based interface to drive Scribus scripts to drive automated
>>> document processes."
>>> I haven't tested it yet. It uses Tkinter which may cause a problem for
>> some
>>
>>
>> There are certain things that Tkinter can do, such as have a dialog
>> which makes a number of simultaneous selections.
>>
>> The down side is that the syntax for Tkinter is more obtuse than Python
>> by itself, so I think what we might consider advanced Python. The
>> CalendarWizard is an example, and while the dialog is nice, the
>> structure of the script shows the complexity that Tkinter throws in there.
>>
>> Greg
>
>
> Greg, thanks for your reply. Can you elaborate what "so I think what we
> might consider advanced Python" means? Are you speaking about using an
> alternate to tkinter ?
>
Maybe I wasn't clear, but what I meant was that using Tkinter with
Python adds another layer of command and structure learning to set up
things like dialogs.
Even though the built-in valueDialog() in Scribus looks like you can
only set one value at a time, you can actually set several at a time by
separating them with white space and then using the Python split function.
Let's say you pull in from valueDialog an entry like '25 blue
cherry' to a variable three_values...
single_value = three_values.split()
single_value[0] will be 25
single_value[1] will be blue
single_value[2] will be cherry
Just like any valueDialog, you can create a default collection of values
if you wish.
Greg
More information about the scribus
mailing list