This forum has been archived. All content is frozen. Please use KDE Discuss instead.

RSS feeds with the last albums of your collection

Tags: None
(comma "," separated)
Miguel Tremblay
Karma
0
Hello all,

One of my friend have written a oneliner that creates a rss feed containing the N (15 in the example) last albums of your collection, in case you want to broadcast the last albums you had aquired.

It needs sqlite3. Feel free to use it.

LIMIT=15 && echo \"SELECT album.name, artist.name, tags.dir FROM tags INNER JOIN album ON tags.album = album.id INNER JOIN artist ON tags.artist = artist.id GROUP BY album ORDER BY createdate DESC LIMIT $LIMIT;\" | sqlite3 $HOME/.kde/share/apps/amarok/collection.db | awk -v NOW=\"`date -R`\" -F\\| \'BEGIN {print \"\\n\\n\\t\\n\\t\\tLast albums added\\n\\t\\t\" NOW \"\\n\\t\\t\" NOW \"\"} {print \"\\t\\t\" $1 \"/ \" $2 \" \" $3 \"\"} END {print \"\\t\\n\"}\' | sed \"s/&/&/g\" > /home/my_username/public_html/feeds/music.rss && cat /home/my_username/public_html/feeds/music.rss

Miguel Tremblay


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]