[scribus] Scripts preferences ?

JLuc jluc at no-log.org
Tue Jun 9 16:53:03 UTC 2020

Le 09/06/2020 à 15:40, Gregory Pittman a écrit :
> Personally, I prefer that there is a generic script out there that can be used by a wide variety of users for a variety of purposes. If I wanted to streamline the operation, then I would make another version, which, for example, might only run in one language and have all the settings hard-coded rather than using dialogs, then call it autotypo_fr.py

I understand your POV but it's a chance that scribus user dont have to tweak a script to access to efficient features 
that fit their need : thanks to Preferences, they dont have to express all of their choices each time they need a 
feature... and to do so they dont need to edit a script, which is a geek thing.

« In an ideal world, scribus scripts would provide the same ease of GUI preferencing as scribus does. »
(But I know there is only part of the ideal world in the real world.)

> The other thing I have done at times is to combine a series of dialogs asking for parameters into a single dialog, with defaults.
> The default for autotypo could be
> fr  1  O
> and then the script uses the python split function to break this up for 3 responses.
That's a quick way to set up a lot of parameters through a dialog.
A bit the same as passing parameters to a function.
Again a bit geeky.

> If it's a script I use frequently, it can be beneficial to streamline it. On the other hand, if it's something I haven't used in a while, I like the reminders for what the defaults are as I go through. For scripts like this, Undo-ing the effects of the script is rather tedious, since there will likely be quite a number of Undos to do.

As for now, the autotypo can be both. It's a transformer.
Answering the 5 dialogs to set the parameters each time is tedious because its allways the same for me
and i use this script a lot now it exists !
So i added a new variable do_ask that defaults to True in the distributed script.
When do_ask, each dialog pops and asks for a choice.
But do_ask can be manualy edited to False, which results in the script not asking but using the defaults values.

That still feels a bit of a hack, but it fits perfectly my needs
and it makes it easier, at least for some users, to use the script more efficiently.


> Greg
> ___
> Scribus Mailing List: scribus at lists.scribus.net
> Edit your options or unsubscribe:
> http://lists.scribus.net/mailman/listinfo/scribus
> See also:
> http://wiki.scribus.net
> http://forums.scribus.net

More information about the scribus mailing list