Wednesday March 27, 2002

Just this week I had a little bit of a turnaround on the direction of my app and it might turn out to be more general purpose than I had initially planned. Just as a little background, I'm writing a blogging tool that doesn't rely on a server-side process like blogger or all the others. I'm learning to program with this app so it's gonna be a Frankenstein monster by the time I'm done. I decided to make it because I want my blogging to be integrated with all the writing that I'd do on my website. It needs to be in xml at some point so that it can be re-arranged and restructured and integrated with non-blog material. For example, for a few months I was publishing a photo a day and later I wanted to make those posts into a gallery but then I had to make all new webpages instead of just flagging the posts and changing the page template. http://ftrain.com showed me that I can extend the longevity of blog posts by making the content structure fluid. I'm not interested in feedback mechanisms right now. I don't think the kind of writing I do warrants it. It's more important for me to be able to easily insert a photo or video (that comes from a media database) than have someone be able to post a comment.

I want a tool for generating a static website on my local computer that I upload. If I could figure out WebDav, I might use that but seriously doubt I will because there's a slim chance that any webhoster will support it. If I need to travel, the damn app is coming with me. I went to India with a laptop so I don't think I need to make it harder to build and use just so it is a stupid web app. If I'm posting photos or vids I need to have Photoshop or AfterEffects installed anyways.

It started out with me trying to just export blogger posts to XML and create a scripted XSLT processing system. XSLT turned out to be ridiculously hard to use and definitely not CMS-in-a-box. And, I had no way to compose xml. I developed a system using Word and then doing XSLT on the XML that Word saves. This was still limited because I had to script the timestamping and ID'ing and categorizing with Word macros. That's when I started using Python. It was still going to be a non-gui XML, XSLT templating system but that broke down as soon as I realized that XML was a crappy storage format because parsing and writing with DOM or SAX is about 500 times more slow and complicated than a database query/update. When I gave up on xml, I said, well, might as well build a damn gui/database app and be done with it. That's where I am now. XML export will probably be the last thing I work on.

I chose Metakit because it looked really lightweight interesting and I didn't want to use one of the Unix db or MS formats. Metakit turned out to be a serious challenge because of the limited docs. I felt like I was being left in the dust by the hardcore c++ coders that primarily used it. And I was used to relational/sql and Metakit is quite different. I'm still on the fence but I'm not sure where to go. Most of the work I've done so far is write wrapper functions for Metakit. I can't seem to get my head around pickle.

I chose wxWindows and PythonCard because Tkinter just seemed clunky and unix-centric. Tkinter seemed to go against the grain. I really wish I could just use visual studio and bang out the forms with VB. But now that MS is abandoning old VB and transitioning to .NET, I didn't want to learn that stuff. Maybe .NET would be great for my app but I don't have the green for the software and it's too new. My experience in the past is that you go looking for some piece of VB code on the net, you find it, but it's a damn ActiveX control that the guy is selling for 49.95. I figure .NET's gonna be this way also.

I now have a schema for blog posts, an app that will let you create posts with titles, summary and bodytext and choose some categories. The schema is simple and blog-centric. It's not Docbook. It's not BlogML either. There's post filtering and date selection and two ways to edit. I have to hand-code if I want an image. I'm using the same plain text markup that textrouter uses (but with less features) and I also have it round-tripping the post through a Word editing session. It stores in MetaKit and the next thing is to use my hard-won XSLT experience and write some slick exporting functions to generate my blog. Right now, I'm composing with my app and pasting the posts into blogger and letting it publish.

It's going to be pretty dumb right now with no revision control but soon I'd like my app to know what to export, when. Right now I control it with a 'publish' Boolean. I want my app to integrate with a more general purpose publishing system so I really only want it to export plain xml (looks like separate files for each post unfortunately) that will get scooped up by some other CMS / template system that I write later.