Redirecting a POST to GET

Due to a DNS change and an uncontrollable form, I was asked to redirect a form from one URI to another. The first attempt was using a redirect in an htaccess file, which failed because the variables being sent via the POST were lost… What to do?

A quick little Perl script with less than 10 lines of code took care of things. We just capture the variables, and convert the POST to a GET and then redirect the browser to the correct location, properly passing all variables in the query string.

And since Apache doesn’t really care what extension is used, as long as it’s defined, you can create script.asp which is really written in Perl running on Linux to redirect to script.asp on another server running Windows and IIS.



Fear of an Aggregated Planet

Let’s mix it up a little… Perl, Python, HTML-TemplateAtom, RSS… Words, Photos, Links, and Objects of Desire…

Say what?

Say Planet Planet!

Or say Planet RasterWeb!

There are billions and billions of planets out there, well, ok dozens maybe. (Heck, there’s even a WordPress Planet.) the one that was the tipping point for me was Planet Burningbird, which is explained in It’s the Oddest Thing.

After seeing Planet Burningbird, I said “Heck, let’s do it!”

The Planet website has no real documentation and very little explaining things. (True geek software, eh?) I downloaded whatever version I could from whatever link I found, and took a look. Python. I mean, I completely gave up on Python earlier this year, but, well, OK. We’ll give it a try…

Now, on Mac OS X I did have a hiccup or two. Searching…. Ok, this post about Mac OS X fixed things. After that it was on to templating. Ah! HTML-Template, but done in Python. (Gosh, where have we heard about HTML-Template before?)

So templating was fairly simple, since I knew the tags. What’s next? Feeds! Yes, we need some feeds… I grabbed my own feed from this site, as well as my feeds from and Flickr and… Is that it? Hmmm, I need more feeds. Luckily I had been experimenting with a Perl module named WWW::Amazon::Wishlist to create an RSS feed of my Amazon Wish List. Of course some of the stuff on my wish list was from the year 2000, so I had to update it. (Honestly I don’t expect anyone to ever actually buy me a gift, but you know, if you want to, the option is there… hint, hint. Aw, who am I kidding? I can barely get feedback on the stuff I do here…)

So where was I?

Ah yes, Feed the Planet, yes… Oh, PubSub! I got two feeds there! One for sites that link to RasterWeb! and one for sites that “mention” RasterWeb!. You’d think if they mention it, they’d link to it, but they seem to have different results. So in theory now, if you link to this site, you should show up on the planet. (This might go sour in the future, we’ll see…)

Is there more? Sure! Though Planet doesn’t seem to handle enclosures in any way, we also have RasterWeb! Audio, which is one of those “podcasting” things we started back in August before podcasting even had a name…

Ok, so that’s the lowdown on the planet. It’s seems to have been released under the same license as Python, and a quick check with the Open-Source Initiative’s Licenses says it’s open-source. (I think.)

Any problems? Well, it doesn’t quite validate. I mean, all the feeds I have control over seem to validate fine, but the Planet page itself doesn’t, partly due to the foreign content from the PubSub feed, and maybe because of Planet doing something silly as well.

So that’s my combination of Perl, Python, HTML-Template, Atom, RSS,, Flickr, PubSub, and other things I won’t mention again. Enjoy!


Fun with SVG Graphs

[Editor’s Note: If your browser does not support SVG images, you should be seeing PNG images instead, which will not look as good as the SVG versions. If you don’t see any images, let me know what browser, version, etc. you are using. It seems some of the popular browsers out there don’t “do the right thing” hmph!]

[Editor’s Note Part 2: Seems that RSS 2.0 can’t handle the <object> tag properly? At least that’s what the validator tells me. The Atom feed seems ok though…]

I’ve been working on some simple graphing utilities in Perl to create SVG graphs… Here’s a few samples…


Our cost for phone service seems to have gone down.


Local utilities continue to rise. Ugh…


We’re spending less on food, well, most of the time. ;)

I like the fact that these are very simple, showing just the trend and not going into details like month, amount, etc. In fact, to create one of these just takes the following:

perl "Phone" "44 54 50 53 44 41 43 53 42 42 44" >phone.svg

Run the script passing in the name you want on it, and a string of numbers space separated, and output it to a file. It’s still a bit fragile, and only does some basic normalizing, so wacky things will break it, but it’s a start. Like all other quick little hacks, in the hands of the guy who wrote it, it “gets the job done” while users would break it in less than 10 minutes and start yelling.

I really like SVG. It reminds me of the old days of plotting out graphics on the Apple ][+ and that’s a good thing! It’s another one of those “edge technologies” I keep hoping will finally catch on big one of these years…


So you’ve learned how to backup your data with something like this:

curl -o delicious.xml -u username:password ""

(Well, the 10000 most recent entries anyway!)

(Note: Since originally writing this, a new method was added: might be used instead. See the API docs for details.)

Now what?

Obviously you run some sick and twisted Perl code on it and you get an HTML page that lists all your posts, by tag, with posts displaying under each tag they belong to…

Anyway, that’s what does…

(It ignores the timestamp and extended field, but you could hack those in if so inclined…)


Audio, Enclosures, renko, etc…

I’ve been very interested in what Adam Curry is doing lately, promoting the ‘iPod Platform’ as it’s being called, though I have no iPod, I still get involved here, as does Dave Slusher at

While these guys are both from the world of radio, I have very little radio experience, only appearing as a guest a few times many years ago. What I do have a background in is publishing – of all sorts – from print, to music, and stuff in-between, so while I’ve got a face for radio, and a voice for the written word, that’s not gonna stop me.

I’ve released renko, which is similar to Adam’s iPodder script, and Dave’s script. I’ve been using similar scripts and cron jobs for almost a year to download some web-radio shows, and doing the RSS enclosure thing when it started happening. This is code that is slightly cleaned up and made fit for human consumption. (Or so I hope!) grab renko if you wish. You’ll need Perl, and if all goes right, you won’t have to install any modules. It’s a proof-of-concept rather than a finished application. It’s got many missing features, but it’s a start. Hopefully it’ll help kickstart this revolution.

(Honestly, I think NetNewsWire could kick butt in this area, it’s a Mac OS X application that could tie directly into iTunes quite easily, and Brent could do it all with a great interface… Brent, you listening?)

Oh, both Adam and Dave wondered about enclosures in Atom and assumed Atom must have something similar, but every time I ask, no one seems to have a good answer. Maybe this will help poke the Atom folks a bit.

I started doing some audio experiments, and if you wanna keep up to date, just subscribe to the feed at with renko, or one of the other enclosure aware aggregators and see what happens. I used Audacity for the most recent version, and it’s improved a bit since I last used it. (Noise reduction helps quite a bit!) Audacity is open-source, so that helps lower the barrier to creating the audio, though I know it’s still not the software Adam is looking for…

Anyway, that’s it for now, must run!

Update: renko is here.