You are here

Amarok Scripting SoC Project - Week 3

My SoC student Peter Zhou has interesting news about his progress with Amarok 2's all-new scripting system. I'm pasting his blog here, as he is not yet aggregated on Planet KDE.

Before that, let me fill you in with the details about our plans for scripting in Amarok 2:

  • Amarok scripts are based on QtScript (= JavaScript)

  • Scripts are running in-process, as opposed to Amarok 1's way of running them in a separate process

  • The new script manager will be able to do version management, and possibly automatic upgrades

  • The scripting API will be much richer and it will be possible to extend the Amarok GUI with scripting

What you can expect is something similar to Firefox's extensions. With one big difference: Amarok still aims to provide a rich feature set out of the box. We believe that an application should be usable without forcing the user to do Lego (TM) building :-)

Peter writes:

I’ve been at home for three weeks, was with my family and had a three-weeks-leisure-break.

Finally, I am sitting here to talk about my summer of code project. I am sorry about the first three weeks break, I really do. But I did try to get familiar with the development environment and tried to hack some code. I am going back to campus in Hong Kong in two days, I can thus concentrate on my SoC project.

For a long time, I was trying to understand what is going on there. Trying to think what the other developers think. For the first month I joined the community, I was amazed that Amarok folks are so in love with what they are doing, and have so much passion on it. Different from my past projects, Amarok is a rather large project, different developers had different views on the future way.

For the first time, I am feeling myself being pulled to the bleeding edge. I compiled QT for four times in two different platforms (How many times for kdelibs and kdeRunTime? :-)). I realized it is sure a though learning process. Playing with the fresh new hot stuffs, I am pretty happy with this.

In the first week, I was busy with my exams, and cleaned up the existing dbus interface.

For the second and third week, I had a slight trip with my girl friend, set up a new Leopard development environment, tested the MPRIS support, and made my first commitment to KDE svn server.

I did some paper work, studied a little with scripts, and I am now quite clear with my goals for the coming busy July.

I made my mind to immigrate everything to qtscript from dbus. I would keep the MPRIS stuffs (PlayerDBusHandler, RootDBusHandler, TracklistDBusHandler) for dbus interface. And the other functions will be scriptable through qtscript. (both ruby and python need additional runtime dependencies, but not qtscript. The simpler the better :-))

Compare to the current functions, I will add more signals since the signal mechanism are rather easy to be achieved using slots and signals. For example, signals like trackEnd ,trackChange, SeekingTime, configurationChange and etc. would be added.

The second change I will make is the scriptable GUI. You will be able to add buttons, menus, lists using scripts.

Before my visiting to Belgium, I will make a easier use script manager which include upgrade checking, simple dependency checking (to check Amarok version and optional packages for Amarok which will be also needed by scripts).

I am so looking forward to the coming working days and nights. Hopefully, I can work out a brand new scripting interface in one and half months and thus I can start a new script project during my visit to Europe.

Peter's original blog can be found here.