I use Safari to subscribe to a bunch of RSS feeds, among them VersionTracker and MacUpdate. The VersionTracker feed was often very slow to load, and I realised it was because every item in the RSS includes two images to be downloaded (even though the images were 1x1 pixels, the extra requests slowed down the entire process a lot). I therefore created a perl script that acts like a webserver on localhost (127.0.0.1) port 8080. Upon a request, it fetches the RSS from VersionTracker and strips the images from it before sending the resulting RSS to Safari (or whatever program that requested it in the first place).
I set up launchd to keep the script running at all times (using Lingon). I also made the perl script change the RSS from MacUpdate. The original feed only contains a rather long title for the items, and no descriptions. I changed this so that only the name and version number is the title, and the rest of the title (that actually is a description of the program) is the description. This made it a lot easier to read in my opinion.
The script is made to work, and I suppose it can be optimised and improved in many ways, for example to allow multiple connections at once. I'm also quite sure that the extra controls to check that the calling IP is 127.0.0.1 are redundant, since I beleive only 127.0.0.1 can connect to 127.0.0.1. The script uses the modules Sys::Syslog, Socket, and LWP::Simple, and these may need to be installed on your system before it will work.
Unmodified, the script listens to the URLs http://127.0.0.1/versiontracker and http://127.0.0.1/macupdate, but I would suggest that you look through the script and add or remove URLs to your liking.
[robg adds: I haven't tested this one.]
I set up launchd to keep the script running at all times (using Lingon). I also made the perl script change the RSS from MacUpdate. The original feed only contains a rather long title for the items, and no descriptions. I changed this so that only the name and version number is the title, and the rest of the title (that actually is a description of the program) is the description. This made it a lot easier to read in my opinion.
The script is made to work, and I suppose it can be optimised and improved in many ways, for example to allow multiple connections at once. I'm also quite sure that the extra controls to check that the calling IP is 127.0.0.1 are redundant, since I beleive only 127.0.0.1 can connect to 127.0.0.1. The script uses the modules Sys::Syslog, Socket, and LWP::Simple, and these may need to be installed on your system before it will work.
Unmodified, the script listens to the URLs http://127.0.0.1/versiontracker and http://127.0.0.1/macupdate, but I would suggest that you look through the script and add or remove URLs to your liking.
[robg adds: I haven't tested this one.]
•
[8,183 views]

