slackerbit.ch

Did I say that?

Updated RewriteMap Script

| Comments

I just finished a rewrite of the mapping program that I used to switch to more google-friendly URLs. Now it no longer needs MySQL installed. Instead, it uses the MT Perl API itself to get the new filename.

As an added bonus, the new URL format is no longer hardcoded, but is taken from the file template that you set in the blog configuration.

UPDATE: And this time, I also link to it

It Doesn’t Work!

| Comments

I think, every computer user, or at least, every one that will ever come into contact with admins, tech support, or just people with a clue, should have to take a madatory course: “Error Reporting 101” And some might even need “Understanding And Answering Easy Questions 105” and “Following The Fuckin Instructions 109”.

Maybe they just confuse me with a clairvoyant, but my crystal ball is broken. So I need a bit more info than “It doesn’t work” and “It still doesn’t work”. And if I ask “What did you do?” and “Was there an error?”, that’s not too much to ask, is it? I mean, you were there. You experienced it first hand.

Oh, and for some people “Reading The Clock 110” might be useful, too. Because, if you were told, that I am in the office between 6:30 am and 3pm, don’t send an email at 3:55pm, asking if I might be able to fix it today. I am good, but time travel is still out of my league.

OK, now it’s back to squeezing some meaning out of this gibberish that is bug reports. TGIF

Blogging via Mail, Securely

| Comments

Since I couldn’t find a decent (for me) desktop blogging client for Movable Type for Linux, I have decided to make it possible to blog from my favourite application: mutt To add some security to the script, it only posts entries that have a good GnuPG signature, and even then only if the fingerprint of the key used to sign is allowed to post. And signing emails with gpg is a snap with mutt. By adding custom headers to the mail, you can even set the category of the entry and ping TrackBack URLs. The script takes the value of the X-MT-Category header, and if that matches the name of an existing category, this is set as the primary category for that entry. Unfortunately, this category doesn’t show up on the main index after the script rebuilds the entry, even though it does show up in the admin section and after a manual rebuild. Maybe someone with a better understanding of the MT Perl API can shed some light on this…Kevin Shay found the reason for this, it had to do with MT doing some caching. Disabling this caching for the rebuild removes this problem And pinging TrackBack URLs happens via the X-MT-Ping header. This header can appear multiple times, and each URL gets pinged. It’s still the first version of the script, so it’s still a little rough. I have been running it under qmail and vpopmail, and to get the script to rebuild the entry, I had to make blog directory writable to the vpopmail group. It works, but if someone has a more elegant approach to this, I am all ears. This script uses a few CPAN modules:

  • GnuPG

  • MIME::Parser

  • Mail::Header

  • MIME::QuotedPrint

And here’s the code: mail2blog.pl. Use at your own risk, if it eats your server, sets your house on fire or lets your hair fall out, I will say “I told you so” :-)

It Worked

| Comments

After some hair-pulling, I now have 4.3.0 up and running, and phpMyAdmin seems satisfied again. But now it’s almost midnight, and I don’t want to code anymore, so there :-)

Just Wonderful

| Comments

I suddenly get a creative rush and want to code something that I promised someone I was going to write over the holidays, and suddenly, phpMyAdmin on the server has stopped working. I get the frameset, but only two empty frames. Let’s see if upgrading to PHP 4.3.0 helps…

Making MovableType Play Nice With Umlauts

| Comments

Since I am using Anders’ tips for archiving MovableType with my german language blog, I noticed a small flaw in the dirify directive. If there are any umlauts in the title, they get simply discarded, leaving behind rather mutilated looking filenames. Since that can’t be good for the Googlejuice, I have added a new function, convert_umlauts, that changes them to their ASCII equivalents. If anybody is interested, here’s the patch