I’ve been working on a submission form for the Old School RPG Planet. Today I added another little feature. This is how I like to develop code. No time pressure. One little step at a time. Keep polishing it.
The planet uses Planet Venus to collect the RSS and Atom feeds of many of the Old School RPG blogs out there. Planet Venus allows you to get the list of feeds via an URL. I’m hosting the list of feeds on Campaign Wiki itself (raw format). As you can see, it the format doesn’t look nice.
The thing I did, therefore, was to write a script that makes it easy for people who are not into the technical details to submit new blogs. It also makes it easier for me to submit new blogs!
The things it handles:
http://and try again.
text/xml(just making sure) and allow the user to pick one of them.
I think it’s pretty cool.
If you look at the interface, you’ll note that it has a link to its own source code. I love this little Perl trick:
__DATA__at the end of the source file. Usually you would add actual data at the end. The script could read it using the DATA file handle.
seek DATA, 0, 0; print "Content-type: text/plain; charset=UTF-8\r\n\r\n", <DATA>;This resets the current position of the DATA file handle to the beginning of the source file. Tadaa!