Tuesday, 24 September 2013

GSoC: Final Report

After three months of coding, this year's Google Summer of Code has finally ended. And it's been quite the experience :)

Last week's unfortunately been more exams than code, but there's also bug fixes (like those script console crashes), improvements (mostly to the collectionview api) and some new features. For instance, Amarok Script is now tagging aware.

The bundled lyrics script can now read embedded lyrics and optionally embed downloaded ones too (though it's more of a workaround until the rest of Amarok is lyrics tag aware).

Wrapping up, here's what was (or was not) accomplished from my proposal.

Accomplished
1. Added new scripting APIs for various parts of Amarok.
2. The following wishes were granted:
  • Bug 187957 - Create submenus from the Scripting interface
  • Bug 176663 - Installing a new script requires a restart of amarok
  • Bug 23271   - Provide scripting interface to customize collection display
  • Bug 279701 - Scripting support for the equalizer
  • Bug 243096 - Load a saved playlist in database from script
  • Bug 313283 - Amarok Scripting API lacks documentation
  • Bug 245647 - Programmatic access to data objects in QtScript
And partly:
  • Bug 150610 - Add Dynamic Playlist API for scripts
  • Bug 183497 - Scripting API to add a context menu to everything representing a song or file
3. The existing interface was cleaned up and some bugs fixed.
4. Added a new script console. 5. Added a script for automated documentation generation, though there's still the issue of getting it to run every time something changes in the scripting/ folder, and actually hosting the generated documentation somewhere. Also, doesn't (yet) document static functions and enums.
Incomplete
From my original proposal, the following still need work:
1. Podcasts

Dropped
1. Dynamic playlists and automatic playlist generator- There didn't seem to be much of a use case for exposing them. ( You do, however, have scriptable biases. )
2. Transcoding- Deemed not worth the effort.

Looking Ahead
There's still the planned scriptable context view, and the scriptable service needs work too. And then there's some more polishing before my branch is ready for a merge.

It's been really nice working with the Amarok community, and hopefully there's more Amarok hacking ahead!

Wednesday, 11 September 2013

GSoC: Weeks 10 and 11

So here's what you can do with Amarok scripting now:

Theming Scripts :)
You can now theme Amarok with stylesheets and QPalettes ( it should have been possible with the existing API too, via QCoreApplication.instance(), but hey )
Perhaps not the best my Amarok has looked, but you get the idea

New Script Console
Here's the new scripting console with QtScriptDebugger components, though I'm yet to diagnose a nasty crash...




Some GUI Access
You now have scripted access to the collection view and the main window, so you can add collection view actions, scripted docks etc.



There's other random stuff, like a convenient setTimeout function with the option of specifying this object and arguments, a mode which lists object names (and copies them to clipboard) for stylesheeting, and a random experiment with a QScriptEngine hooked to a the code completion model (not too useful for now), and some fixes.

Plus, there's a new script in the works, but more on that later.

Sorry, I've been irregular again, but I've had a lot going on these past two weeks :|

This week though there are more serious plans: script access to the context view, tags and podcasts (I seem to have missed this :/).

You can find all of this on my gsocScripting2 branch on quickgit.kde.org. Thanks for reading :)