Tuesday, 23 July 2013

Weeks 4 and 5

Hey, as mentioned in my previous posts, I'm working on revamping Amarok's Scripting Interface as part of this year's Google Summer of Code. For those of you who've been living under a rock, Amarok is the best thing in music players since the phonograph.

So here's what I've been upto:

  • Scripting documentation
One of the biggest gripes about Amarok's scripting API has been the lack of documentation. There's mostly just a manually created [read error-prone] list of exposed interfaces on the wiki.

Auto-magic documentation of the scripting API posed a different challenge, as the scripting API does not resemble the standard Amarok C++ code.
After procrastinating it for a good three weeks ( how many of us follow their proposals, anyway? ), I settled on this python script to generate a pseudo-header, and also an auto-completion list, but more on that later.

Here's the resulting doxygen output.

It's not perfect yet, but the results look pretty decent. Please do comment though if you know of a better way of going about this!


  • Autocomplete
The script console's auto-complete is working now. Because nobody likes looking up the documentation too often ( or retrying, or introspecting, or whatever ),  just to get the syntax of an arbitrarily named interface right.



Sadly, no contextual information, but anything more would probably require me to move to kdevplatform. Any katepart/ ktexteditor guys willing to correct me?






  • Deprecation Notification


This might be one of the more controversial additions, but hey, it's all for the greater good.

Users running scripts accessing deprecated API calls see a popup of the sort on the left, so they can bug script writers into updating their scripts.





What are your views on this, Amarok Script Writers?


  • No restarts
That's right, you no longer have to restart on installing a new script in Amarok, so you can right down to listening to your Google Music content after installing the script ( well, as soon as streamitem's fixed in my branch actually ).

There's more changes under the hood, and still lots more to cleanup and document, but I have new leads - Markey just pointed me Richard Dale's SMOKE, which might hopefully help get things done better.

No comments:

Post a Comment