[Scribus] Applescript to python tutorial?

Craig Ringer craig
Thu Jan 27 18:18:51 CET 2005

On Wed, 2005-01-26 at 08:51 +0000, John Kershaw wrote:

> A comparative, line-by-line run through of a something like 'make 
> doc, make pic box, import pic, make text box, import text, add 
> styles, save, close' done in AppleScript & Python would be ideal.

Here you go. The example is pretty boring. Drop it in your home
directory, put an image named 'demo.png' (your choice of image, though
it should be a PNG image) in the same directory, and run it from Scribus
using 'Script->Execute Script'. The top of the script is configuration,
so you can change paths easily, etc.

Sorry it's perhaps not as readable as it could be ... I've tried to
describe things in a bit of detail (though I assume basic Python
knowledge), so the script is more cluttered than it would ideally be.
I'm also pretty tired, which never helps me make sense or code well.

Anyway, it does what you wanted... hope this helps.

If you wouldn't mind posting the equivalent AppleScript, that'd be

When it comes to comparisons, my personal suspicion is that Python is
more complex and more work to do simple automation tasks, but will knock
AppleScript's socks off as things get more complex or demanding.

I do hope we get a standard external program scripting interface like
AppleScript uses for *nix one day ... but one that doesn't force a
single language's syntax on you. Something like DCOP, but across the
whole OS, would rock a lot.

Craig Ringer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: demo.py
Type: application/x-python
Size: 10392 bytes
Desc: not available
Url : http://nashi.altmuehlnet.de/pipermail/scribus/attachments/20050127/ad5a7515/attachment.bin 

More information about the scribus mailing list