Archive

Posts Tagged ‘RSS’

Music, RSS/Atom, Mac Support

August 17th, 2005

Music

On the music player front I’m reworking the playlist control. All the track data is going to be stored in a sqlite database. The displayed information will come from a custom nsITreeView implementation. This should make it possible to include some neat features like showing the playlist by artist or album. Also, it will make it easier to support other types of content like podcasting.

The biggest unknown I have is how drag and drop of rows will work, because I haven’t found any good examples or explanations about how that’s supposed to work.

I was able to greatly simplify playback by removing the separate thread that was being used to notify when playback had finished.

I also fixed the rounding issue that someone else had mentioned in response to one of my earlier posts.

The player now displays the time as you drag the position marker.

I found a bug in mozilla tree view, that I’m currently working on creating a patch for.

RSS/Atom

I haven’t had too much time to fool around with this code, but I did manage to improve the feed reader support for the upcoming simohealth release. Now, instead of scrapping news.google.com, it grabs the atom.xml feed from their site, caching it daily. I wonder if my asking about support for this at OSCON helped influence the support of a news feed from google. At any rate it certainly makes life a lot easier.

Mac Support

I’ve become much more fimilar with the mac over the last couple of weeks and now have xul music working on the mac as well as it does on linux and win32. I have to admit, I’m very happy with the mac, it’s a pretty cool environment. I’ve been without my linux notebook though for the last few weeks so i’m a little concerned about the state of the gstreamer implementation, but hope to get my linux system within the next few days so I can start working on it again. Heres a screenshot of the Mac xulmusic running:

UPDATE:  SimoHealth was acquired by revolution health in 2005.  RevolutionHealth was acquired by waterfront media – SimoHealth was decomissioned between 2006 and 2007.  If you would like to get the source drop me a line, it’s pretty dated at this point.

Software , , ,

XUL Music Gets PodCasting!

June 29th, 2005

I just spent the last 12 hours, really giving xulmusic some love.

Lots of corners rounded and many more roughened up with new features.

I added a first pass options dialog and a simple about dialog box.

By far the coolest feature is support for podcasting. I still have some more work to do with this, like:

1. download progress meter, per stream.
2. updating content timers (configuration option required).
3. fix next and previous to ignore podcast headers.

It doesn’t look like I’ll have a mac version for 0.3, but I will definately have it built for a 0.4 release.

My goals for version 0.3 are:

  • podcast rss feed support
  • streaming music (shoutcast)
  • installer (stand-alone)

I’ve recieved a lot of really great feedback on the 0.2 release. Here’s some of the names suggested by Mike:

  • fireplayer
  • crossplayer
  • icebird
  • talon
  • shadowfire
  • audifox/audibird
  • melody

The feature list suggested by Mike:

  • support extensions like firefox
  • randomize playlists
  • include a system tray icon (win32/gnome/kde)
  • support for flac/shn/etc.. (maybe format support can be added in extensions)
  • make the program stand-alone with an installer
  • themes/skins (like xmms/winamp)
  • support for streaming music (shoutcast)
  • get a cool logo (related to name?)
  • podcast rss feed support

Software , , ,

Thunderbird Nightly builds are awesome!!

June 1st, 2005

I just tried out the latest thunderbird nightly, and I have to say wow! It’s really nice. The RSS support is really well done – at least for this new timer ;-) Also, things felt much more responsive on my linux machine compared to the 1.0 release. I’m sure the 1.1 release is going to be great.

Software ,

Some nice xul samples

June 1st, 2005

Some great xul apps and a much more complete rss reader: http://www.georgenava.com/applauncher.php

Update:

Apparently the link above is dead.

Software , ,

Banded From Slashdot!

May 31st, 2005

Apparently, there are rules about how many times you are allowed to download an rss file. Having used slashdot as my test site it appears I’ve been banned. I now get a feed telling me “Your Headline Reader Has Been Banned” ouch! Well, I guess If anyone goes to try the RSSReader I posted, remember it’s a *proof of concept* not something to be used on a daily basis. Something I might do if it seems interesting enough would be to implement a blogging tool in xul. (I’m sure someone has done that already though!).

Software , ,

RSS Reader for XULRunner

May 31st, 2005

After a day or so of work here it is! A Xul based RSS Reader.
rss-xulrunner.tar.gz
The hardest part was getting this to work with xulrunner after having
written and tested it with firefox 1.0, I found quiet a few things have changed.

The one thing that had me really confused was a document.write that continually failed.
It turns out I was calling it in an unnecessary setTimeout call.

My next job as is to figure that out and create a simple test case.

Also, I got this to work nicely with escaped atom.xml files. That is blogger.com seems to format many of their atom.xml’s escaping the html tags, like
as <br>

Software , ,

My First Post, some RSS processing with Javascript

May 30th, 2005

I’ve been doing a lot of thinking about how to use xul templates to generate a nice display of an rss feed. I decided I might be able
to get further using Javascript. In fact after writing a little code
to fetch the rss document and grab the fields in javascript I think
this approach isn’t half bad.

Here’s what I’ve come up with:

// a global array of each RSSFeedvar gFeeds = new Array();
// loads a resource file listing each rss feed we're
// tracking
// TODO: provide a callback for progress
function loadRSSFeeds(){
  // TODO: actually load this info from a file
  loadRSSFeed( gFeeds, "http://kernel.org/kdist/rss.xml", true );
}
// TODO: provide a callback for progress
// load a single RSS Feed, non blocking
function loadRSSFeed( feeds, feedURL, display ){
  var xmlhttp = new XMLHttpRequest();
  xmlhttp.onreadystatechange = function(){
    if( xmlhttp.readyState == 4 && xmlhttp.status == 200 ){
       var feed =  new RSSFeed( xmlhttp.responseXML );
       feeds.push( feed );
       if( display )
         feed.show();
    }
  };
  xmlhttp.open( "GET", feedURL, true );
  xmlhttp.overrideMimeType("text/xml");
  xmlhttp.send(null);
}

// simple helper to extract the firstChild nodeValue from
// a DOM Element
function getFirstChildValue( element, name ){
  return element.getElementsByTagName( name )[0].firstChild.nodeValue;
}
function getFirstChildValueNS( element, ns, name ){
  return element.getElementsByTagNameNS( ns, name )[0].firstChild.nodeValue;
}

// given an RSS DOM object walk it's
// tree and display the content
function RSSFeed( rssDoc ){
  var channel = rssDoc.getElementsByTagName( "channel" )[0];
  this.title = getFirstChildValue( channel, "title" );
  this.link = getFirstChildValue( channel, "link" );
  this.desc = getFirstChildValue( channel, "description" );
  this.lang = getFirstChildValueNS( channel, "http://purl.org/dc/elements/1.1/", "language" );
  this.creator = getFirstChildValueNS( channel, "http://purl.org/dc/elements/1.1/", "creator" );
  this.date = getFirstChildValueNS( channel, "http://purl.org/dc/elements/1.1/", "date" );
  this.show = RSSFeed_show;  this.items = new Array();

  // now walk the items
  var items = rssDoc.getElementsByTagName( "item" );
  for( var i = 0; i < items.length; ++i ){
    this.items.push( new RSSItem( items[i] ) );
  }
}

function RSSItem( rssItem ){
  this.about = rssItem.getAttributeNS( "http://www.w3.org/1999/02/22-rdf-syntax-ns#", "about" );
  this.title = getFirstChildValue( rssItem, "title" );
  //rssItem.getElementsByTagName( "title" )[0].firstChild.nodeValue;
  this.link = getFirstChildValue( rssItem, "link" );
  //rssItem.getElementsByTagName( "link" )[0].firstChild.nodeValue;
  this.desc = getFirstChildValue( rssItem, "description" );
  //rssItem.getElementsByTagName( "description" )[0].firstChild.nodeValue;
  this.show = RSSItem_show;
}

function RSSFeed_show(){
  dump( "RSSFeed\n" );
  dump( "Title:" + this.title + "\n" );
  dump( "Link: " + this.link + "\n" );
  dump( "Desc: " + this.desc + "\n" );
  dump( "Lang: " + this.lang + "\n" );
  dump( "Date: " + this.date + "\n" );

  for( var i = 0; i < this.items.length; ++i ){
   this.items[i].show();
  }
}

function RSSItem_show(){
  dump( "RSSItem\n" );
  dump( "About: " + this.about + "\n" );
  dump( "Title: " + this.title + "\n" );
  dump( "Link: " + this.link + "\n" );
  dump( "Desc: " + this.desc + "\n" );
}

Then I found this document: http://developer.apple.com/internet/webcontent/xmltransformations.html

After reading this I have started to think that it might work nicely to have a default rss style sheet with more of a browser like interface. This needs some more thought...

Anyways, I'm happy to say I finally have my own blog setup! Hopefully, I'll be able to keep this more up to date then my website.

Software , , ,