Uplisting

Amarok 1.x Scripts

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

0
Score 50.0%
Description:

Uplisting creates a HTML page of what you've been playing in amaroK. This page is uploaded via virtually any protocol and can also be displayed as a desktop applet (see screenshot).

To install, save the file to your favorite download location. In amaroK, Tools->Script Manager, click "Install Script" and select the downloaded file. It should then appear in the script list. Click 'Run' to start the script. The first time it runs it should open up the configure window automatically. You can access it again by clicking 'Configure' within the Script Manager.

You can contact me via #amarok on irc.freenode.org or use the email at the top of the script.

Dependencies:
*amaroK 1.2-beta4 or later
*Ruby 1.8 (developed using 1.8.2)
*Korundum from KDE 3.4-beta2

Todo:
*resize images (use rmagick?)
*make uploading optional (rename script?)
Last changelog:

14 years ago

0.5: Displays up-to-date generated HTML in an KHTML desktop window.
0.4: Now it lists the directory and only uploads new covers, also uploads all needed covers to a newly configured directory. Remembers playlist between runs. xtemplate now stored in a seperate file default.xtemplate
0.3: Fixed a run-time error that would stop the script
0.2: Now it goes newest->oldest, script doesn't stop if you close the window, there's a max # of items, remembers playlist between runs
0.1: Initial release

RockeGomp

14 years ago

I want to use this for my webpage, but it won't work properly for me. When I try to run it an error message come and tell me

The script 'uplisting.rb' exited with error code: 1

Details:

IO failed: No such file or directory - /home/amund/.kde3.4/share/apps/amarok/scripts-data/uplistingrc/usr/lib/ruby/1.8/rexml/parsers/baseparser.rb:133:in `stream=': Array is not a valid input stream. It must be (RuntimeError)either a String, IO, StringIO or Source. from /usr/lib/ruby/1.8/rexml/parsers/baseparser.rb:100:in `initialize' from /usr/lib/ruby/1.8/rexml/parsers/streamparser.rb:6:in `new' from /usr/lib/ruby/1.8/rexml/parsers/streamparser.rb:6:in `initialize' from /usr/lib/ruby/1.8/rexml/document.rb:171:in `new' from /usr/lib/ruby/1.8/rexml/document.rb:171:in `parse_stream' from ./xtemplate/lib/xtemplate/xml.rb:343:in `parse' from ./xtemplate/lib/xtemplate.rb:31:in `initialize' from /home/amund/.kde3.4/share/apps/amarok/scripts/uplisting/uplisting.rb:216:in `new' from /home/amund/.kde3.4/share/apps/amarok/scripts/uplisting/uplisting.rb:216:in `initialize' from /home/amund/.kde3.4/share/apps/amarok/scripts/uplisting/uplisting.rb:511:in `new' from /home/amund/.kde3.4/share/apps/amarok/scripts/uplisting/uplisting.rb:511:in `initialize' from /home/amund/.kde3.4/share/apps/amarok/scripts/uplisting/uplisting.rb:533:in `new' from /home/amund/.kde3.4/share/apps/amarok/scripts/uplisting/uplisting.rb:533

Looking closer I saw that it was looking for a scripts-data/uplistingrc file. I created an empty uplistingrc file, but this only gave me a new error message.

The script 'uplisting.rb' exited with error code: 1

Details:

/home/amund/.kde3.4/share/apps/amarok/scripts/uplisting/uplisting.rb:486:in `load': End of file reached (EOFError) from /home/amund/.kde3.4/share/apps/amarok/scripts/uplisting/uplisting.rb:486:in `load' from /home/amund/.kde3.4/share/apps/amarok/scripts/uplisting/uplisting.rb:485:in `open' from /home/amund/.kde3.4/share/apps/amarok/scripts/uplisting/uplisting.rb:485:in `load' from /home/amund/.kde3.4/share/apps/amarok/scripts/uplisting/uplisting.rb:508:in `initialize' from /home/amund/.kde3.4/share/apps/amarok/scripts/uplisting/uplisting.rb:533:in `new' from /home/amund/.kde3.4/share/apps/amarok/scripts/uplisting/uplisting.rb:533


Looks like I don't get anywhere without a proper configfile. Could someone please send me a working uplistingrc file, so I can started using this script. I am currently using a php script to retrieve the last played songs from audioscrobbler, but it is often very slow, using this uplisting script seems like a much better solution.

Report

RockeGomp

14 years ago

BTW: I'm using kde-3.4.0 and amarok 1.3-cvs, I have ruby, smoke, korundum installed. All on Gentoo GNU/Linux.

Report

phf

14 years ago

hi RockeGomp

i got a similar error here.
it can be fixed easily with some ruby hacking

in uplisting.rb line 218
change
XMLTemplate.new(template)
to
XMLTemplate.new(template.to_s)

et voila...

cheers

phf

Report

dfras

13 years ago

great hint - it worked out for me!
Only issue: how can I configure a FTP-Server?

Report

C

eean

14 years ago

I just tried without an uplistingrc installed and it worked fine. Sounds like you have everthing installed right. Don't know what it could be.

Report

RockeGomp

14 years ago

Ok, I guess it's just my computer being weird then :)

Anyway I wrote my own uplist script in python/bash, which suits my needs pretty well. Thanks for checking out my config file theory anyhow, and for inspiration to make my own script.

Report

Superstoned

14 years ago

another question: is knewstuff going to be integrated in amarok, so you can download and install new scripts?
And will it be able to check for updates for the installed scripts?

Report

seb

14 years ago

Yep, done. KHNS is supported in kde 3.3, which is the base dependency for amaroK 1.3. You can check it out in cvs

Report

markey

14 years ago

KNewStuff is only really integrated in KDE 3.4. amaroK currently depends on KDE 3.2, so no way. We'll support it later on.

Still, amaroK's ScriptManager features a comfortable installer, which can handle any kind of tarball, like .tar.bz2. So you just got to download the script and tell amaroK to install it, that's all.

Report

C

eean

14 years ago

If Korundum gets KNewStuff support, I plan on writing a KNewStuff script so that amaroK would have it before 3.4 becomes a dependency. Looking at the source code for wallpaper downloader in kdebase it looks very simple to implement.

Report

Superstoned

14 years ago

cool script, but ehm... the dependencies are quite insane. I happen to have amarok 1.2beta4, but korundum 3.4beta2 isn't even on the official korundum website... maybe you can try to use less bleeding edge software? I can handle some beta's but don't overdo :D

Report

C

eean

14 years ago

This is a valid point. I wanted to depend on Korundum 3.3.2, but came accross some parts missing in the API that got fixed recently. Actually I tried using Kommander instead, but found that doing KIO with the kfm client is pretty limited (an interface like the CLI client `ftp` to KIO would be nice) so switched back to Korundum. The bright side is that I've found a few holes in Korundum's API that Richard Dale has been filling.

Report

tbraner

14 years ago

So how can we get Korundum3.4-beta2?? I would really like to use this, but this is quite wierd to have a dependency that isn't even out yet.

Report

C

eean

14 years ago

With the KDE RC1. Or wait for KDE 3.4 to come by a distro near you - as Calvin's dad would say, it will build character.

Report

Superstoned

14 years ago

well, I'll wait for KDE 3.4, I don't really want all the hassle... but I'm sure your script is a fine work :D

Report

markey

14 years ago

For everyone interested in amaroK scripting, we have made a HOWTO which explains the process of script writing:

http://amarok.kde.org/wiki/index.php/Script-Writing_HowTo


Happy Scripting!

Report

markey

14 years ago

Eean, congrats for making the first amaroK script. It looks cool :)

Report

shodekiagari

14 years ago

This looks like a nice script. I of course, am clueless. Where do I edit the configuration? Can I upload the results to another server?

And finally... how do I run it? heh.

Thank you.

Report

C

eean

14 years ago

You edit the configuration with the GUI. Just click 'configure' in the amaroK script manager. I will add instructions on how to install it, given that this is the first amaroK script on kde-apps.

Report

parentaladvisory

14 years ago

realy interesting thingy :)
i'd try it if i ran the cvs-version, but i guess when the 1.2 version of amarok is done, maybe some bugs has been "killed", and then i will try it :)

Report

14 years ago

0.5: Displays up-to-date generated HTML in an KHTML desktop window.
0.4: Now it lists the directory and only uploads new covers, also uploads all needed covers to a newly configured directory. Remembers playlist between runs. xtemplate now stored in a seperate file default.xtemplate
0.3: Fixed a run-time error that would stop the script
0.2: Now it goes newest->oldest, script doesn't stop if you close the window, there's a max # of items, remembers playlist between runs
0.1: Initial release

12345678910
product-maker Count: 4 Rating: 5.0
File (click to download) Version Description Downloads Date Filesize DL OCS-Install MD5SUM
*Needs ocs-url or ocs-store to install things
Pling
Details
license
version
0.5
updated Feb 12 2005
added Jan 25 2005
downloads 24h
0
page views 24h 2
System Tags addon