RSSOwl – stripping non-standard tags from OPML
I use the excellent RSS Owl RSS reading client, based on the Rich Client Platform. It is a great piece of software and allows me to track a huge number of feeds without resorting to an online solution like Google Reader (not linked!!).
However, its feed export utility outputs non-standard OPML, or more precisely, adds its own namespace to OPML that some of my other tools seem to choke on. Internet Explorer, the only feed reader I have at work, is one such tool, so before I take my relevant feeds into work I need to strip out the non-standard tags.
I’ve started to get good at regular expressions and tools like grep and sed so after a little playing I was able to come up with a script using just sed to do exactly what I needed. Here it is:
#!/bin/sh sed -i 's/ rssowl:id=\"\([0-9]\+\)\"//' $@ sed -i 's/ rssowl:isSet=\"\([A-Za-z]\+\)\"//' $@ sed -i 's_ xmlns:rssowl=\"http://www.rssowl.org\"__' $@
The resulting script can be used as a command, passing the filename to strip as an argument. The resultant XML seems to work well.
Tags: Blogs, Browsers, Computing, I need to get our more, Linux, Open Source, RSS, Unix, Web