[Kstars-devel] KStars & scripting
Yiannis Belias
jonnyb at hol.gr
Thu Feb 25 23:22:15 CET 2010
Hello all,
Sorry for the late reply!
Khudyakov Alexey wrote
> Hello everyone.
>
> Here is some thoughts about kstars scripting, rants, problems, possible
> solutions.
...
> Scripts are using D-bus to communicate with kstars. Therefore I propose to
> clean up current D-bus interface and document it. Latter part is most
> important. It's not possible to write scripts when interface is unknown.
Well, it seems the script builder acts like a kind of documentation system,
like the "function wizard" in open office.
> After that both script builder should and code for script execution should
> be removed. They are maintenance burden.
>
> Your opinions on the matter?
Since I'm interested in scripting with kstars, I did a small search about KDE scripting.
At Amarok for example, they have kept a subset of their old d-bus scripting and
added a javascript api based on QtScript framework[0]. Others seem to use QtScript too,
like plasma for writing plasmoids and controlling the desktop. On the other hand, there is
smoke(seems to export much of kde api) and kross(not for stand alone scripts?)
that support many languages, like python and ruby.
Out of curiosity, I followed the QT scripting guide[1], and made an example of how
one could use a supposedly existing kstars javascript api to make a simple calculation.
I'm attaching the files to see for yourselves.
Also, I've been looking at the kstars/INDI docs and there are references[2] about INDI scripts
for controlling devices, even with the help of script builder[3].
I have not been able to find a reference of how a script like that could look like, though ...
Just some commented out INDY functions in kstars.h
Cheers!
Yiannis
[0] http://amarok.kde.org/wiki/Development/Scripting_HowTo_2.0
[1] http://qt.nokia.com/doc/4.6/scripting.html
[2] http://www.indilib.org/index.php?title=INDI_Concepts#What_are_INDI_clients.3F
[3] http://docs.kde.org/development/en/kdeedu/kstars/indi-capture.html [@bottom]
--
Yiannis Belias <jonnyb at hol.gr> `
Homepage [http://users.hol.gr/~jonnyb/video] ' .
GNU+LINUX: ' '
IN A WORLD WITHOUT FENCES WHO NEEDS GATES? . *
-------------- next part --------------
A non-text attachment was scrubbed...
Name: earth.h
Type: text/x-chdr
Size: 324 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kstars-devel/attachments/20100226/2f6f36e0/attachment.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qtscript.pro
Type: application/vnd.nokia.qt.qmakeprofile
Size: 80 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kstars-devel/attachments/20100226/2f6f36e0/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.cc
Type: text/x-c++src
Size: 497 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kstars-devel/attachments/20100226/2f6f36e0/attachment.cc
More information about the Kstars-devel
mailing list