I finally got around to implementing that proof of concept I spoke about a few days ago. It’s a wap-based weblog editor. I was able to post to my weblog via a email to weblog gateway while I was in florida, but it took way too many steps to be useful. I tried to implement this a few days ago, but I stumbled across weird errors from a blogger API implementation in PHP. This afternoon I thought I’d try again, this time in Perl.
I hit up CPAN for Net::Blogger, which includes Net::Blogger::Engine::Userland::metaWeblog. I stumbled around that for a little bit, as it’s been forever since I’ve used Perl for something useful. I was able to quickly post to a test weblog from a perl script. After that, I created a cgi script that takes info from wapblog.wml and posts it to a weblog. Wapblog.wml is just a simple wap form and the weblog is currently hard coded in the cgi script. A lot of stuff is hard coded and it’s quite ugly, but I will get the source out there as quicky as I can deuglify it.
All of the heavy lifting is done by the the perl modules. The source is about 45 lines long, but there’s lots of white space (it doesn’t look dense enough to be perl). The WML that feeds the cgi script is about 24 lines long. Granted, someone could do a lot more with a small cgi, but I like this solution. It can probably be run in a hosted environment, as the only requirements are Net::Blogger and CGI. It’s extremely lightweight. It lets you blog on the run. Now all I need is a cel phone with a UI that doesn’t suck.
Here are some screenshots. The source is now available: wapblog-0.0.1.tar.gz. It is currently licensed under the Perl Artistic License. That may change in the future. Let me know if the license offends anyone.