Dedicated to my late brave, beautiful and silly mummy, Debra Ross. I love you mumster.

Skip navigation

WordPress eXtended RSS fun

WXR

I haven’t been having much luck with technology this week, but this seems to be the icing on the cake so to speak. The problem is no matter how hard I try I just can’t get WXR working.

WXR is of course the WordPress eXtended RSS format which allows you to quickly export the entire written contents of your weblog including posts, pages, categories, tags and kitchen sinks. It means you can pick up the guts of your weblog, then do a backup of your wp-content folder which contains all your uploaded media, plugins and themes, then import them somewhere else.

Only problem is, this is the seventh time and I still can’t get it to work on one WordPress installation. I have a local web server running on my MacBook Pro which I’ve set up to test new themes and plugins I’m working on, and on this local installation of WordPress I can import my Rubenerd Show material without any trouble at all, but I’ve had no end of trouble when I try to do the same thing from the Rubenerd Blog.

The curious thing is that there’s no consistency to the errors. On Thursday I tried importing from this weblog and WordPress silently failed; the import page just stopped rendering after it had uploaded the file. Then yesterday I tried again and it was able to import posts but only up to September 2006 when it decided to stop.

The only things I can think of that could be causing this problem is the WXR export php file in WordPress wasn’t uploaded to the server correctly, or the file (2.2MiB) is too big somehow for my local web server to handle, or maybe there’s some malformed HTML in one of my posts which breaks the resulting XML file it’s contained in… maybe it’s just gremlins.

One clue though showed itself when I tried to open the exported WXR file in Smultron:

So perhaps it’s an encoding issue? Or does Wordpress not output UTF-8? Could it be failing because some of my posts have East Asian characters which need UTF-8?

Whatever this blasted problem is, it looks like this is going to be a very, very, very long Saturday.

Using Smultron and TextMate

Smultron is an open source text editor for Mac OS X written by Peter Borg, and I must say I’m impressed with it. Simple code editing on individual files is a snap, and the sidebar is much more elegant than an entire row of confusing tabs.

I’m currently a TextMate on my MacBook Pro user mainly because of convenience. For one thing the projects are easy to set up and are in XML (which I’ve been told I have a borderline perverse obsession with), and from one Bundles menu I can select the language I’m coding in and I have all the actions and properties I need. Smultron does have Project like functionality, and it does have a code colouring menu which actually supports far more syntax rules than TextMate, but it doesn’t have the other functionality for individual languages.

I don’t think it’s fair though to compare TextMate and Smultron head on, because I use them for different things. Editing individual text files which have little in common with each other is obviously easier in Smultron because of TextMate’s maddening lack of tab support for files that aren’t a part of the same project, but TextMate is more useful for managing entire projects, such as Ruby on Rails site or a graphical Java Swing programme. If you’ve used Mac OS X for a while, I like to think of TextMate as a replacement for Xcode, and Smultron as a replacement for TextEdit. Sort of.

From a polish point of view, TextMate’s icons are certainly much slicker than Smultron’s default ones, though Gaetan Ark has released the original icons for Smultron he designed as a separate file you can use to patch your Smultron.app file.

Like a true open source gentleman Peter doesn’t ask outright for money, but he does have a donation page if you find his program useful. When I get my POSB MasterCard thingy I’ll definably put some bread in the jar. Even though I’m not a Piano Man.

Some basic screenshots of some crappy Ruby and Perl scripts I whipped up to demonstrate the syntax support. Ignore the date, as of May I’m still typing 2006 on everything.

Ruby in Smultron

Perl in Smultron

As for my FreeBSD machine though, nothing beats Kate!