<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    <title>Amarok Blog - peterzl</title>
    <link>http://amarok.kde.org/blog/</link>
    <description>Amarok developers at work</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.1-alpha7 - http://www.s9y.org/</generator>
    <pubDate>Sun, 20 Jul 2008 04:17:15 GMT</pubDate>

    <image>
        <url>http://amarok.kde.org/blog/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: Amarok Blog - peterzl - Amarok developers at work</title>
        <link>http://amarok.kde.org/blog/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>GSoC Week 6: Amarok Scripting Interface</title>
    <link>http://amarok.kde.org/blog/archives/741-GSoC-Week-6-Amarok-Scripting-Interface.html</link>
            <category>peterzl</category>
    
    <comments>http://amarok.kde.org/blog/archives/741-GSoC-Week-6-Amarok-Scripting-Interface.html#comments</comments>
    <wfw:comment>http://amarok.kde.org/blog/wfwcomment.php?cid=741</wfw:comment>

    <slash:comments>27</slash:comments>
    <wfw:commentRss>http://amarok.kde.org/blog/rss.php?version=2.0&amp;type=comments&amp;cid=741</wfw:commentRss>
    

    <author>nospam@example.com (Peter Zhou)</author>
    <content:encoded>
    Hey, I have a lot things to demo since we were moving very fast In the past two weeks!&lt;br /&gt;
&lt;br /&gt;
I&#039;ve added a lot of QtScript API functions, including GUI, Playlist, Collection, Music Engine and Scriptable Service. &lt;br /&gt;
&lt;br /&gt;
Here are some small pieces from the whole cake:&lt;br /&gt;
&lt;br /&gt;
one of the engine signals:&lt;br /&gt;
&lt;br /&gt;
function TrackChanged()&lt;br /&gt;
{&lt;br /&gt;
    print( &quot;Dude! Do something! The track changed!&quot; );&lt;br /&gt;
}&lt;br /&gt;
Engine.trackChanged.connect( TrackChanged );&lt;br /&gt;
&lt;br /&gt;
Track Meta Info:&lt;br /&gt;
var TrackInfo = Amarok.Engine.TrackInfo;&lt;br /&gt;
StatusBar.shortMessage( &quot;You are listening to album: &quot; + TrackInfo.Album );&lt;br /&gt;
&lt;br /&gt;
Collection and Playlist Access:&lt;br /&gt;
var totalTrack = Amarok.Collection.totalTracks;&lt;br /&gt;
Amarok.Playlist.clearPlaylist;&lt;br /&gt;
&lt;br /&gt;
I&#039;ve almost finished the DBus interface by supporting MPRIS standard ( &lt;a href=&quot;http://wiki.xmms2.xmms.se/wiki/MPRIS&quot;  title=&quot;http://wiki.xmms2.xmms.se/wiki/MPRIS&quot;&gt;http://wiki.xmms2.xmms.se/wiki/MPRIS&lt;/a&gt; ). Now the script manager could handle script errors, write them to log files and correctly start/stop scripts. A simple demo script and a scriptable service QtScript called &quot;Cool Stream&quot; was released with Amarok Alpha 1.&lt;br /&gt;
&lt;br /&gt;
&lt;img src=&quot;http://lh3.ggpht.com/peterzhoulei/SHgOyRhBnAI/AAAAAAAAB-A/UQFKwOgjBfc/snapshot1.jpg?imgmax=720&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
Everyone loves eye candy, the API implementation and bug fixing are mostly behind the scene. So I decided to make some candy for non-latin character users &lt;img src=&quot;http://amarok.kde.org/blog/templates/default/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;.&lt;br /&gt;
I grabbed the charset detector code from Mozilla, merged them into Amarok. Now, the wolf recognizes non-UTF8 tags:&lt;br /&gt;
&lt;br /&gt;
&lt;img src=&quot;http://lh6.ggpht.com/peterzhoulei/SHgOyT-wuuI/AAAAAAAAB-I/3II93SfTjJI/snapshot2.jpg?imgmax=720&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
The summer of code project seems always stuck on some building system stuff. The charset detector didn&#039;t compatible with cmake 2.4.8, and the Qt bindings generator was needed to be ported from qmake to cmake. ( thanks &quot;compiling king&quot; Ian for helping me &lt;img src=&quot;http://amarok.kde.org/blog/templates/default/img/emoticons/laugh.png&quot; alt=&quot;:-D&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;  )&lt;br /&gt;
&lt;br /&gt;
The SoC project will be ended in one month. And we still have some work to do. Ladies and Gentlemen, let&#039;s wait for the finalized script API, and the brand new script manager! 
    </content:encoded>

    <pubDate>Mon, 14 Jul 2008 12:33:00 -0400</pubDate>
    <guid isPermaLink="false">http://amarok.kde.org/blog/archives/741-guid.html</guid>
    
</item>
<item>
    <title>GSoC Week Four</title>
    <link>http://amarok.kde.org/blog/archives/712-GSoC-Week-Four.html</link>
            <category>peterzl</category>
    
    <comments>http://amarok.kde.org/blog/archives/712-GSoC-Week-Four.html#comments</comments>
    <wfw:comment>http://amarok.kde.org/blog/wfwcomment.php?cid=712</wfw:comment>

    <slash:comments>5</slash:comments>
    <wfw:commentRss>http://amarok.kde.org/blog/rss.php?version=2.0&amp;type=comments&amp;cid=712</wfw:commentRss>
    

    <author>nospam@example.com (Peter Zhou)</author>
    <content:encoded>
    AH! Some big progresses and decisions have been made this week. So let&#039;s take a quick glance at the new Amarok Scripting interface. Here we go!&lt;br /&gt;
&lt;br /&gt;
var Engine;&lt;br /&gt;
Engine = Amarok.Engine;&lt;br /&gt;
Engine.Stop( true );&lt;br /&gt;
Engine.Play();&lt;br /&gt;
Engine.Seek ( 60*1000 );&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://picasaweb.google.com/peterzhoulei/MyScreenShot/photo#5216830425266434770&quot;&gt;&lt;img src=&quot;http://lh3.ggpht.com/peterzhoulei/SGXnob90stI/AAAAAAAAB8Y/tr_KKyA3eWE/snapshot1.jpg?imgmax=640&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
You can run the QtScript code using the script manager. Is the code simple enough for you? Using the code above, you can control the music engine of Amarok. For the current track info, just use AttriVal = Amarok.Engine.TrackInfo.someAttr.&lt;br /&gt;
&lt;br /&gt;
No need to import libs for using any APIs. Besides, you will also be able to use the entire Qt APIs in the near future!&lt;br /&gt;
&lt;br /&gt;
Now, let&#039;s add two menu objects under the &quot;Tool&quot; menu:&lt;br /&gt;
&lt;br /&gt;
function Menu1Clicked()&lt;br /&gt;
{&lt;br /&gt;
print (&quot;hey, I am menu1!&quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function Menu2Clicked()&lt;br /&gt;
{&lt;br /&gt;
print (&quot;hey, I am menu2!&quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Amarok.Window.addSeparator();&lt;br /&gt;
Amarok.Window.addMenu( &quot;testMenu1&quot; ); //you are creating a new object here!&lt;br /&gt;
Amarok.Window.addMenu( &quot;testMenu2&quot; );&lt;br /&gt;
&lt;br /&gt;
Amarok.Window.Menu.testMenu1.triggered.connect(Menu1Clicked); //then we can play with the new toy &lt;img src=&quot;http://amarok.kde.org/blog/templates/default/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;br /&gt;
Amarok.Window.Menu.testMenu2.triggered.connect(Menu2Clicked);&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://picasaweb.google.com/peterzhoulei/MyScreenShot/photo#5216830430552786754&quot;&gt;&lt;img src=&quot;http://lh4.ggpht.com/peterzhoulei/SGXnovqMB0I/AAAAAAAAB8g/lnI2uFSaxao/snapshot2.jpg?imgmax=640&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Finally, you can control the OSD and the statusbar widget (in the right bottom corner of the main window)  using the code below:&lt;br /&gt;
&lt;br /&gt;
var OSD = Amarok.OSD;&lt;br /&gt;
OSD.setText( &quot;Hey there!&quot; );&lt;br /&gt;
OSD.show();&lt;br /&gt;
&lt;br /&gt;
var StatusBar = Amarok.Window.Statusbar;&lt;br /&gt;
StatusBar.shortMessage( &quot;Hey there!&quot; );&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://picasaweb.google.com/peterzhoulei/MyScreenShot/photo#5216830437696756002&quot;&gt;&lt;img src=&quot;http://lh6.ggpht.com/peterzhoulei/SGXnpKRcWSI/AAAAAAAAB8o/hHvm6tvlsUE/snapshot3.jpg?imgmax=640&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Still a young wolf ah? A lot more APIs need to be implemented, like the playlist, collection, services, some GUI control, and networking APIs...&lt;br /&gt;
&lt;br /&gt;
I am really happy as I am growing with Amarok. Let&#039;s pray for an another productive week, and wait for more magics pop up! &lt;img src=&quot;http://amarok.kde.org/blog/templates/default/img/emoticons/laugh.png&quot; alt=&quot;:-D&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt; 
    </content:encoded>

    <pubDate>Mon, 30 Jun 2008 04:45:04 -0400</pubDate>
    <guid isPermaLink="false">http://amarok.kde.org/blog/archives/712-guid.html</guid>
    
</item>

</channel>
</rss>