There is no concept of "tag" in the Movable Type Export format. You have two choices right now. Either I ignore tags, or I jam your category list full of tags. Maybe one of these days I'll have nothing better to do than try to modify the export code in Movable Type Open Source to add an export option for tags, but until then, anyone complaining about losing their tags is SOL.

And by SOL I don't mean Virginia's standardized tests.

Capisceme, ora?
For me, one of the biggest problems with figuring out MT is figuring out what what in the @_ array. This little function may be useful for others who are in bad shape like me, to use as a skeleton for figuring out what is being passed to their functions by the MT framework. All of it goes into the system activity log.

sub debug{
    require MT;
    my $index = 0;
    foreach my $item (@_) {
        MT->log({message => $index++ . " " . ref($item)});
    }
}

Some ideas for Movable Type

| No Comments
I am not a Perl programmer, and it shows with the cluelessness that I display toward some of the quirks of Perl from time to time. However, I use Movable Type, and I find its API to be very interesting. Lately I've been starting to figure out how I would go about writing a plug-in for Movable Type 4 that allows you to replicate at least some of the functionality of a hit counter system similar to SiteMeter. I've got some basic code written and in testing now, and if it works out, here's what I expect would be the first four releases of what I am calling, for lack of a better name, MT Site Monitor:

  • 0.25 Initial objects are complete and tested. The initial application framework is in place to allow MT Site Monitor to record hits.
  • 0.50 Basic ability to view the raw log data from your hit counter.
  • 0.75 The ability to designate certain hits as "suspicious," and view them as a separate page from the log viewer.
  • 1.00 More advanced views of the hit data.

If I get beyond that, who knows where it might go?

Another thing, I am trying to figure out the legal and technical feasibility of converting over and hosting some good WordPress themes for Movable Type 4. I have limited time and a lot of bias, so if I can get around to this and be in the clear, I think I would keep to just the themes that my wife likes for her blog. Speaking of her blog, she's been using WordPress for some time now due to the themes that it has, and WordPress 2.3 seems to have killed all of her favorite themes. Why am I not surprised?...

**UPDATE** 1/1/2008: It would be just my luck that not only is there a good plug-in which provides much of the functionality that I wanted to implement with MTSiteMonitor, but the author of it would be the guy who helped me on the mt-dev mailing list to figure out how to use the <mtapp:listing> template tag which is vital to displaying tables in Movable Type's framework. What I may do is see if I can add some of the functionality that I want to the VisitorStats plug-in, in the form of a small plug-in that extends on the objects that he wrote. Well, I'm grateful for the help, nonetheless and so in the spirit of doing right by the guy who helped me out, I'm not going to turn his generosity against him by competing with him.
I wrote my export script a while ago, back when there was a real need for it for WordPress 2.0-2.1 and Movable Type 3.3. Movable Type 4.X includes an importer for WordPress' content that is exported as RSS data. Anyone switching to Movable Type from WordPress really ought to give that a shot, as it is going to be a lot better supported by Sixapart, than my export script is going to be supported by me these days.
Whoops... forgot to migrate the instructions for how to run the script from my main blog to this one.
Grab it here. Bugs? Leave me a detailed description of what went wrong, including error messages.

 

WordPress 2.3 and my export script

| No Comments
WordPress 2.3 dropped a few tables that were used in previous versions of WordPress that my script assumed to exist. I have no idea why the WordPress team saw fit to make this change, as I cannot see how they gained anything from merging tags and categories into the terms table. Seems to me to be an asinine way of changing things, but we already know that I am not all that big on WordPress anymore. I've got a preliminary fix in the works that works on a VMware image of Xubuntu where I have installed a copy of WordPress 2.3 on a typical LAMP setup. I'm not ready to release it into the wild yet because I haven't really had a chance to test it out yet. I'll finish up the testing tonight, and hopefully have it uploaded here.

 

Download it here. It contains a bug fix for the trackback output that generates the dates the same way that it does for the comments. Let's call this... version 1.3....

What Movable Type 4.0 hath wrought

| 1 Comment

I installed Movable Type 4.0 on a test domain and database, and lo and behold, it appears that they have completely dropped the original import system. This means that if my WordPress to Movable Type Export script is to be able to help out people who are using Movable Type 4.0 (when it comes out of beta), I will have to rewrite much of it from scratch. The new backup system is actually very slick, but it is actually now for storing an entire blog it would seem. That's a real change from the days when it just exported entries, comments and trackbacks.

Well, that's one aborted idea

| No Comments

I spent about thirty minutes trying to grok the code for MySQL Connector/J earlier today, and I ended up giving up on it. I was trying to read it in order to get an understanding of what you have to do to write a something that can communicate directly with MySQL as part of a preliminary investigation into writing a new Python driver for MySQL. To do it right would require me to learn far more about all of the options that MySQL has, and the ins and outs of how MySQL works to ever be worth it, so I just gave up. Doesn't seem to be any harm in that, in my opinion. I just don't have the energy to bring myself to care enough to try something like that, especially since I don't even have any side projects that would require a pure Python driver. The current driver unfortunately relies on a foundation written in C, which makes it a non-starter for mixing into web applications written in Python. A shame, really.

On a different note, one thing that might be useful as web applications go is a supplemental XML-RPC API for Movable Type that allows you to hook into proprietary features like rebuilding pages and such. That and a Python API that wraps it on the server side might be worth looking at.

Recent Comments

  • triom: Thank you very much for this script! It was extremely read more
  • MikeT: The download link has been fixed. Keep in mind that read more
  • Edwin: Is your script still downloadable somewhere? Got an error message read more
  • mong: I tried it but no so good. Only 1/10 posts read more
  • Matthew: Not quite perfectly. Still has some issues with invalid XML read more
  • Michael: Works like charm. All entries, categories, authors, and comments were read more
  • [BLT]FQX: Categories were jammed and tags were missing. No error message read more
  • Steffen Giers: Ok, i've found a bug imho. After runnig the script read more
  • Steffen: Well done! Thanks! read more
  • kuroneko: Hi, MikeT, thanks for this script. I suggest using "$table_prefix" read more

Find recent content on the main index or look in the archives to find all content.