Last.fm Chart Plugin For Mephisto --------------------------------- This plugin allows you to include chart info from the music site, last.fm, in your Mephisto templates. Usage ----- Install the normal way: ruby script/plugin install http://svn.danwebb.net/external/rails/plugins/mephisto_lastfm/trunk After installing the plugin provides you with a new liquid tag, 'lastfmchart'. Use it like this:
    {% lastfmchart user: 'bob', type: 'toptracks', top: 20 as track %}
  1. {{ track.title }} - {{ track.artist }}
  2. {% endlastfmchart %}
The options user and type are mandatory. user is for your last.fm user ID and type is the type of chart to include. It can be any of these values: recenttracks weeklyartistchart weeklytrackchart topartists toptracks topalbums weeklyalbumchart NOTE: weeklyalbumchart doesn't seem to be implemented by last.fm yet but I assume they will at some point. The top option is not require but can be used to specify how many entries you want to display. To avoid hitting the last.fm site too much caching is enabled and is automatically flushed every 24 hours but you can adjust this with the expires_cache_every property of Lastm: Lastfm.expires_cache_every = 3.hours There's a whole host of properties available. See the API documentation at http://www.audioscrobbler.net/data/webservices/ The property names are the same as the XML tagnames. (C) Dan Webb 2006, under an MIT licence. http://www.opensource.org/licenses/mit-license.php Please leave any bugs or feedback at http://projects.danwebb.net