A short while ago I wrote about using JavaScript in glow: Glow Kludges and noted that Fraser Davidson had briefly showed me his use of XSL in glow. I had hoped to catch up with Fraser to find out more about this, but have not managed to yet. He had mentioned that it should be possible to combine Javascript with the pages produced from xml (say a rss feed) and styled with XSL.

This weekend I was looking at this again, due to the horrible weather, and started googling XSL, while I’ve not got a real(any) understand of XSL I have managed to do my usual copy, paste & mangle and got some interesting results. I was able to take various rss feeds, format them with XSL and then insert media players with JavaScript. I don’t really know enough to understand this, but have made a wee screencast to some of the things I’ve been playing with.

One tip I do have for editing xml and xsl in glow is not to use the glow interface, just set links to your XML (and optionally XSL) in the XML webpart. These file then can be edited and updated without going into the glow ‘modify shared page stuff’ trying to edit the xml or xsl in Safari or firefox in a tiny text box is a pain.

I’d be interested in working with other glow folk to see where this could go, I wonder if a national group could be set up for discussion and testing.

It does make me wonder why these potentially powerful techniques have not been explained or documented by LTS or RM they would have answered many of the folk who were disappointed by lack of RSS support in glow.

The screencast is pretty rough, more of a thinking aloud one while looking at the screen than a planned out video, but I’d be keen to know what you think about this.

Original video replaced by vimeo copy (11.07.2011)

twitter icon

I’ve messed about with the twitter API before in a ham fisted sort of way (say ObliqueTweet, twitter presenter or Tweets @iowconference08) by basically borrowing various snippets of code, this is another such effort.

I notice an interesting post on Tom Smith’s theOTHERblog: Twitter, Growl, Boosh! In AppleScript!!. I’ve borrowed code from Tom before and was interested in this latest script. The script basically used growl to show tweets for a search or hashtag to be used when watch tv with a group spread over different locations. Tom’s script used the Vienna rss reader as a intermediary for handling the RSS. I recently switched from Vienna to NetNewsWire and didn’t have Vienna installed so took a slightly different approach.

I remembered that someone had mentioned that AppleScript handles xml now (via the ‘System Events’ application) and this seemed like an opportunity to mess about with that and growl.

Growltweets

I’ve cobbled together an applescript that runs and every minute, downloads the latest from a twitter search and growls them. The script is pretty rough at the moment (and in all likelihood will stay that way) but I’ve posted it for view and will upload the actual script once it looks a wee bit better.

The script might be of use in the same way Tom’s is, to display tweets over a shared experience. Or perhaps so make sure I don’t miss an @johnjohnston tweet but don’t get caught up in twitter while I am ‘working’ but really it served to give me a bit more practice with the twitter search API and in starting to learn to parse xml with AppleScript. As twitter become bigger by the second and its API continues to grow I hope one day I’ll do something useful.

twitter image Mirjami Manninen from smashingmagazine