Tag Archives: XML

Skinning Yehuda (or the development of an igoogle theme)

For a little while, I had been wanting to play with my own Google theme. The Google search page can be customised by the individual. All you need to do is to create your own account and be logged in.

The trouble was, though I was interested in the technical nature of this, I didn’t actually have any big idea as to what I wanted the theme to be.

Whilst acknowledging that this was rather back to front, it didn’t diminish the interest.

Then, I was looking at my favourite online strip (currently on hiatus), Yehuda Moon and the kickstand cyclery and I thought “that’ll be good to use as a base for my own experiment”.

As a result, I came up with this skin for google:

This was my first theme, showing Yehuda cycling through the snow

This was my first theme, showing Yehuda cycling through the snow

This was based on the 23rd Feb 2008 strip.

I thought this came out quite well for a first try, it’s pretty simple really. What you have is a text file which contains XML. This is a formalised language to say ‘use this colour here, this image there‘ and so on. The images and file are uploaded so they can be seen by google, and then you can try out your own theme. All the details of how to do this are here, and I won’t be re-writing this tutorial.

Having had my fun with ‘proof of concept’, I decided I’d like to use a Yehuda theme on my iGoogle homepage, and can only do this if it’s submitted to Google, and can only do this with Rick’s consent. Rick draws Yehuda Moon.

So, I told him what I’d done, and asked for his blessing.

Before he could respond, I’d put together a second skin:

This was a composite from two different strips.

This was a composite from two different strips.

This was based upon the strip for the 31st Dec 2008 and for the 25th December 2008

Rick responded – he liked the idea, and he and I discussed what could be done with it.

I suggested that we work toward a dynamic theme, which changes throughout the day. The idea would be to show ‘a day in the life’ of the kickstand gallery. We decided to do a basic structure and add to it over time, eventually ending up with a full dynamic theme which changed regularly to provide interest. The theme would be roughly in sync with the time of day, so someone using google in afternoon would see a daytime scene.

I created an ftp login so that Rick could send files to me, I would then encode them as static skins, i.e. the look would not change. Rick would comment about any tweaks. Once everything was okay, I would incorporate these static skins into a dynamic google theme which chose a different look depending upon the time of day.

In the meantime, Rick got busy, and said that what I’d already done was something he was happy with, so I submitted the two skins above. As a result we’re now in a position to announce that the first public version of the theme is available on the iGoogle directory, and you can find it here (or just search for ‘Yehuda’). Over time, we’ll quietly update it to add more variation, and then we will gradually modify it as seasons change. At least, that’s the intent. To use this theme with iGoogle, you need to be have a google account, and be logged into it.

Enjoy!

The theme continues to be updated – there are now many more in the rotation. Unfortunately it takes google AGES to approve each update, so the live version won’t update too often.

Feeding Sed with XML and producing a GUID

I’m trying to bring more exercise into my life (have been for a while!) and I use the website ‘mapmyrun‘ to log my activities (it has sister sites, mapmyride and mapmytri which are effectively just ‘skins’ on the basic design). Using these sites provides an unambiguous record of how much (or how little) I do, which is somewhat motivating.

There is an RSS feed of my activities, but it contains a little too much information (I don’t want to broadcast to the world how much weight I need to lose!)

Therefore, I ‘clean it up’ using a script.

Here is the script I currently have:


cd ~
wget -q http://www.mapmyrun.com/rss/rss_workouts?u=xxxxxxx --output-document=exercise.rss
grep -v "<b>Weight:</b>" exercise.rss | grep -v "<link>" > exercisejournal.rss
rm exercise.rss

sed '
s/<\/b>//g
s/<channel>/<channel><link>http:\/\/www.mapmyrun.com\/<\/link>/g
s/<br\/>//g
s/<b>//g' <exercisejournal.rss >public_html/finalfile.rss

I then take the feed and give it to feedburner, which then tidies it up further. I decided to put the result into ‘friendfeed’ – but it wasn’t taking.

So I validated it:

This feed is valid, but interoperability with the widest range of feed readers could be improved by implementing the following recommendations.

line 9, column 43: item should contain a guid element (158 occurrences) [help]

Duration: 00:52:00 (HH:MM:SS)

Could it be simply that friendfeed doesn’t like the feed due to lack of guid?

No worries, I’ll write an extra sed line which takes the date,time and possibly other info to create a guid for each item…. but I cannot get the syntax right; I don’t even know if this is possible, given that the date and time are on different lines!

Why possibly include other info? This may be needed for when I do two bits of exercise on one day which have the same duration (I’d include kcal and the heart rates, I think.

There has to be a neat way to generate a unique guid for each item and insert it…. can anyone see how to do this? Is sed the correct command, even? I’d be grateful if you could let me know. The xml prior to feedburner doing its thing is here.

Reader and Bloglines

As I’ve previously discussed, I’ve recently moved from Bloglines to Google Reader. So far, I’m loving it – the ‘share’ feature alone is great (and will be better the more of my acquaintances use the site… hint…hint…). As well as appearing on murky.org‘s homepage (as I type), my shared links are available here, as well as within your own Reader account, if I’m one of your contacts.

Heather Hopkins has done an analysis of the two sites. Bloglines is ahead of Google Reader (but I seem to recall that it did have a head start). Interestingly, users of Google Reader tend to read much more news, and users of Bloglines tend to view much more photography.

What’s interesting to me is how (with a little wobble) the sites have tended to move up and down together, one isn’t pulling ahead of the other, despite how bloglines decided to (factually) spin it by pointing out they were ahead.

I’ve used Reader for about a week now. Long enough to get the feel, not long enough to be locked in. The ideal time to make a judgement.

Bloglines somehow feels, to me, a little more developed. One can keep items unread (though google has the ‘star’) (UPDATE: This is actually wrong, there is an unread feature in reader – thanks Aq) and the feeds are sorted by feed. In Google Reader the feeds seem to be arranged chronologically, which isn’t always desirable (I’d want to sort oldest first, or by feed with oldest first) (Update: I had a blind spot, you can change the sortorder).

The general interface for reader is just slick. You can select one feed at a time, but I just hit ‘all items’ and scroll with the mouse wheel. As items are displayed they’re marked as read (you can scroll up if something zoomed past too fast). Hitting the ‘star’ marks the item as something you want to look at later. Hitting ‘share‘ will do the obvious of sharing it with your contacts (who use reader) as well as adding it to a webpage.

When they first implemented ‘share’ they got it very wrong indeed, everything was shared. Bad, bad idea. What happens now is that one manually clicks ‘share’. Each feed can be ‘tagged’, I have tags like ‘cycling’, ‘comics’, ‘rugby’ and ‘science’. You can make it so that everything in a given tag is shared (my tags are all private). I don’t see any need to do this – if someone wants everything in a feed they can subscribe themselves! The sharing feature, right now, is pretty damned good – and it works ‘as expected’, which is about the best that any software feature can expect.

Instead of ‘sharing’ (for public consumption), one can ‘star’ (to make it easier to find something later). It is so easy to ‘star’ something – very easy. So easy that one can end up with loads of items to read ‘later’ (I’m starring something for more considered perusal)… but then, it’s very quick to scroll the starred items – and of course, there is a top notch search function. (There are keyboard shortcuts)

I’ve only found one problem with reader. That is occasionally it will say there is one new article, but refreshing everything doesn’t reveal it. This is a weird bug, but wait a bit and it generally clears as other articles come in.

The other issue is pretty minor. It’s the stats. There are a whole load of metrics which help you to pick out the feeds you read all the time, and those which you always miss. These seem to be based on if a feed is displayed (so I tend to read 100% of items as I view all items and scroll) – I’d much rather have a list based on how long each item was on screen for. For example, I scroll through slashdot pretty fast, stopping occasionally, but I will tend to linger over sites like xkcd and Bike Noob, I will click through to sites like Yehuda Moon. Stats based on clicks and time on screen would be much more useful to me than simply the fact that an article has been on screen for a few seconds.

Bloglines does share some of this, but on the whole, I think I’m a Google Reader convert. I did look at it once before – and moved back. This time, I gave it a chance and I’m staying. There’s something about the way it’s put together which is really nice – now, if only more of my friends were using it to ‘share’….

…. and it’s been built with the blind in mind too, that’s got to be a good thing.

Of course, this site’s feeds are easy to access:

Main Feed:Add Murky.org to GoogleSubscribe with Bloglines

Comments: Add Murky.org Comments to GoogleSubscribe with Bloglines

Google Reader

THIS ARTICLE HAS BEEN SUPERCEDED

Add to GoogleIt may have been around for a little while, but I didn’t notice – so it was news to me that Google now has an RSS aggregator, first impressions are that it looks good – although I prefer the bloglines interface. (See this article for more on RSS and what it can do).

To add a feed one simply searches (ooh, let’s say ‘murky.org’) and then one can preview the feed in the reader and hit ‘subscribe’. (If you click the link in this paragraph and do not have a google account, you will need to create one).