[Scribus] [SCRIBUS] [ANN] MY FIRST PLUGIN: SCRIPTERNG

Petr Vanek petr
Tue Nov 13 10:18:16 CET 2007


hi Henning,

> I sat down and tried to learn cmake, sip and more of C++. After fixing
> the myplugin example ;) I wrote my  first Scribus plugin.
> The result is available at http://henning.cco-ev.de/scribus/scripterng.tgz

It looks very interesting.
Is it writtent to work with 135svn or anything else?

Anyway it looks a bit cryptic for me. Can you provide more docs in the code,
please?

I had a little talk with one guy from Kross team. He said they will have
pure Qt (no kde deps) Kross ready in 2 months propably. What are
dis/advantages of your solution comparing to Kross?

Do you have some ideas of "scripterng object model"? I mean what do you want
to export from Scribus to python?
 
> More can be added easily. Help would be appreciated :) See also
> http://wiki.scribus.net/index.php/Public_C%2B%2B_API
> Perhaps someone could  also help me with cmake?
> 
> I tried to keep the C++ part as small as possible. A lot of stuff can
> be implemented in PyQt, e.g. the script console. Even enabling
> QtScript (a Javascript implementation) or DBUS would be possible with
> a few lines of code!

Good idea - except one thing: it's another dependency to distribute. It's
not problem on Linux/unix but it could be an issue on Windows.

> If the Scribus team is interesed in my code I would happily donate it.

Perfect.

Let's wait for Craig Ringer comments. He knows quite everything about Python
integration.

cheers!
petr vanek

> 
> PS: There still seems to be a problem in loading the module. Call
> scribus from INSTALLPREFIX/lib/scribus/plugins/scripterng

yep.

subzero at mojo-jojo:~/scribus/TRUNK/lib/scribus/plugins/scripterng>
../../../../bin/scribus
adjustCanvas 795.28 881.89 0 0 ( 0 0 ) - ( 795.28 881.89 ) @ 1 QSize(63,-7)
request mode: 0
request mode 0 --> 0
fill Buffer: QRect(0,10 795x786) special: false true
fill Buffer: QRect(0,10 795x786) special: false true
fill Buffer: QRect(0,10 795x786) special: false true
ScripterNG loaded


Pythonize constructor -- pid = 18560
Loading
"/home/subzero/scribus/TRUNK/lib/scribus/plugins/scripterng/scripterng.py"
Running script:
/home/subzero/scribus/TRUNK/lib/scribus/plugins/scripterng/scripterng.py
scripterng.py running
Traceback (most recent call last):
  File
"/home/subzero/scribus/TRUNK/lib/scribus/plugins/scripterng/scripterng.py",
line 2, in <module>
    from scribuspyqt import PyQtObject
  File
"/home/subzero/scribus/TRUNK/lib/scribus/plugins/scripterng/scribuspyqt.py",
line 2, in <module>
    from _scribuspyqt import fromVariant, invokeMethod, Test
ImportError: No module named _scribuspyqt
Loading failed
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'Application' is not defined





More information about the scribus mailing list