All posts by rbowen

Less time online, poison ivy, spam

For the last 3 weeks, and, minimally, for the next two months, I’ll be online considerably less. I’m working days at a customer site, Monday through Thursday. The network at this customer site has firewalling and proxing of the “prisoners in” rather than “invaders out” variety. So, no IRC, no ssh, not even any outside POP connections. As if I’d have time, anyway. I’ve been kept busy all day. It’s drudge work, but I’m busy, and doing largely useful things.

Anyways, this all means that when I come home, I have 1000+ email messages waiting on the server, and the predominance of spam is much more marked in these large numbers that it is when receiving email 5 or 10 at a time. Mortgage and Pharmaceuticals appear to be the in spam these days. I marvel that there are enough morons out there buying spam-marketed products that it’s still this lucrative.

Last Sunday, apparently, I got into some poison ivy. It started itching on Sunday, and has gotten gradually worse since then. This evening I was completely miserable, with both arms covered with blisters and itching horribly. I hope today was the worst, because if it gets any worse, I might have to go see a doctor about this. Note to self: No more hiking in short sleeves and sandals.

What I’m reading

I just updated my What I’m Reading list, and realized that I’m now reading 13 books at the same time. While this makes for an interesting interplay between the various plots in my befuddled mind, it tends to mean that some of these books, I may never finish. I think I’ve been reading Little Dorrit for 2 years now, and Chasing Shadows for about 1 year. Dandelion Wine, of course, I read every year, so that hardly counts. So maybe 12 is more realistic. I need to make a concerted effort to finish some of these.

I just signed up with Audible.com, which is a audio book service where you download audio books to listen to on some electronic device. In my case, on my Palm Tungsten E. The quality is very good (at least, for me, with my admittedly low standards) and I can also listen to them in the car, with one of those cassette tape car adapters. Mine, however, is just about to give up the ghost, and takes some wiggling to make it play correctly. For $15 a month you get one audio book a month, as well as a daily “subscription” like the New York Times. The audible.com software is painfully unintuitive, and it took me nearly an hour to get my first book onto my Palm, after which I still wasn’t sure how I had done it, so I’m not sure that I’ll be able to do it any faster next month. We’ll see.

Stowaway wireless IR keyboard.

My new Stowaway wireless IR keyboard arrived today. It’s pretty neat, really. Rather than having a hardware connection, it has an IR “wand” that you position above the Palm device, and communication is done via IR.

On the minus side, the latch that holds the thing shut is amazingly hard to open. One of those things where you’re sure you’re going to break it before you get it open. I hope it will loosen up after I’ve used it a little while.

Of course, I’m writing this with the keyboard. 🙂

Anywhere but here

Where would you rather be?
Anywhere but here
When will the time be right?
Anytime but now

(Double Agent – Rush – Counterparts)

When you look at me suddenly it’s clear
You’re burning up my dreams
Crazy as it seems
I don’t wanna be anywhere but here
Anywhere but here

(Anywhere but here – Hilary Duff – Metamorphosis)

So book me on a plane for Paris
Or on a cruise to a desert isle
Anywhere but here where love disappeared
Anywhere but here
I wanna party in New York City
And climb over the China Wall
Anywhere but where your love disapeared
Anywhere but here

(Anywhere but here – Eden’s Crush)

You’ll always be with me, always be with me
Part of my heart for all time
Where I’m going , you’re going
Even if it’s just in my mind
Leaving’s not leaving
I’m not leaving you behind

(Anywhere but here – LeAnn Rimes)

(California is gonna be the place for me.)
Oh leave it all to disappear. I’m heading anywhere but here.
Because I want a life, a souvenir.
I’ll find it anywhere but here.

(Anywhere but here – KD Lang)

No, there wasn’t a point. Except that it seems that only a teenage girl wants to stay right where she is. I don’t expect there’s any deep message in that.

Comments not lining up

It appears that the code that I posted earlier has the unfortunate side effect that comments are associated with the wrong articles. I’m not entirely clear on how this happened, but it looks like I have a lot of work ahead of me to make them line up again. I’ll look at this in more detail tomorrow and try to supply another patch that will generate export files that line up correctly. 🙁

Ahhhhh

There are few things in life more pleasant than a liesurely dinner with dear friends. The only trouble is that I have to go to work in the morning …

Done with migration

Ok, I think I’m all done with the migration from Movable Type to WordPress. Took rather longer than advertised, but I’m mostly satisfied with the results. I think that, visually, it looks terrible, so I’ll have to get someone with CSS fu to do something about that for me. But the software itself is surprisingly slick, and fast. I’m pleased.

I was going to try to contribute some of my experience back to the documentation project, and may still do so. But the documentation appears to be largely in Wiki, and, despite my best efforts, many Wikis continue to baffle me, when folks try to use them as a primary documentation repository. It works for some folks, but so often it just doesn’t. Since my long-term goals include contributing to the docs on a number of projects that use Wiki as the docs engine, I need to get over this. So WP seems a friendlier place than some to get started on this effort. Maybe next week.

More about migrating from MT to WP

I’ve completed the migration, and I thought I’d pass along some accumulated knowledge. It seems that people have gone to a great number of contortions to make their MT URLs continue to work under WP. I believe I have a simpler solution. Just force WP to use the same ID numbers as you were using with MT. This involves making the following changes.

First, you need to edit the module that handles MT exports. This will be at lib/MT/App/CMS.pm

In sub export you’ll find a blob of text that starts with $tmpl->text(< <'TEXT'); and defines the template with which stuff will be exported. To that blob, add a new field: ID: <$MTEntryID$>

No. Placement doesn’t matter.

Then you’ll need to edit import-mt.php. This is located in the wp-admin directory on your new WP installation. You’ll need to make the following changes.


@@ -225,6 +225,9 @@
case 'AUTHOR':
$post_author = $value;
break;
+ case 'ID':
+ $post_import_id = $value;
+ break;
case 'TITLE':
$post_title = addslashes($value);
echo ''.stripslashes($post_title).'... ';
@@ -277,9 +280,11 @@
} else {
$post_author = checkauthor($post_author);//just so that if a post already exists, new users are not created by checkauthor
$wpdb->query("INSERT INTO $tableposts (
+ ID,
post_author, post_date, post_date_gmt, post_content, pos
t_title, post_excerpt, post_status, comment_status, ping_status, post_name, pos
t_modified, post_modified_gmt)
VALUES
- ('$post_author', '$post_date', '$post_date_gmt', '$post_content', '$post_title', '$excerpt', '$post_status', '$comment_status', '$ping_status', '$post_name','$post_date', '$post_date_gmt')");
+ ('$post_import_id',
+ '$post_author', '$post_date', '$post_date_gmt', '$post_content', '$post_title', '$excerpt', '$post_status', '$comment_status', '$ping_status', '$post_name','$post_date', '$post_date_gmt')");
$post_id = $wpdb->get_var("SELECT ID FROM $tableposts WHERE post_title = '$post_title' AND post_date = '$post_date'");
if (0 != count($post_categories)) {
foreach ($post_categories as $post_category) {

In other words, you’re forcing the import to use the IDs that you want it to use.

Once you’ve done that, import the resulting export file, and add this to your Apache config:


# Movable Type -> WordPress fu
RewriteEngine On
RewriteRule ^/journal/(index.html)?$ /wordpress/ [PT]
RewriteRule ^/journal/archives/(.*?).html /wordpress/index.php?p=$1 [PT]
RewriteRule ^/journal/index.rdf$ /wordpress/wp-rss2.php [PT]

… of course, modified to reflect whatever URLs you happened to be using.

Migrating to WordPress

The promised 5-minute migration to WordPress was, of course, rather too much (or little, I suppose) to expect. The instructions are lacking a few important clarifications. Perhaps after I get done migrating, I can submit come amendments to the documentation.

The thing that I’m struggling with right now is trying to get my existing Movable Type URLs to point to the correct articles in WP. This doesn’t work because, although the import is in the same order as the export, because I’m running more than 1 blog, the ID numbers end up getting out of sync. Presumably, if you have only one blog, the export will correspond exactly to the ID numbers. But since MT uses the same ID pool for all blogs, each article from another blog causes the eventual ID numbers to not line up. I have no solution to this yet.

If you care to enlighten me … well, comments are temporarily turned off, because of the veritable FLOOD of comment spam that I’m receiving at the moment. Sorry.