Importing MT archives: month by month

I’m starting work on importing my archives from The Long Letter into Eclecticism.

What I’m dealing with is simply the fact that I have archives dating back to November of 2000. While Movable Type has an ‘export’ feature, it exports everything. With fewer posts, that might be less of an issue, but since I’m going to have to go through post-by-post to double-check URLs, add pictures, and so on, I wanted to see if I could figure out how to import one month’s worth of posts at a time, instead of the whole kit and kaboodle.

Here’s what I ended up with…

  1. Create a new Archive Template, and put the following code into the template:
     TITLE:
     AUTHOR:
     DATE:
     PRIMARY CATEGORY:
     CATEGORY:
     -----
     BODY:
    
     -----
     EXTENDED BODY:
    
     -----
     EXCERPT:
    
     -----
     COMMENT:
    
     AUTHOR:
    
     EMAIL:
    
     URL:
    
     IP:
    
     DATE:
    
     -----
     PING:
    
     TITLE:
    
     URL:
    
     IP:
    
     BLOG NAME:
    
     DATE:
    
     -----
     --------
    
  2. In MT, under the ‘Weblog Config’ button, go to the ‘Archiving’ section. Click the ‘Add new…’ button, set the Archive Type to ‘Monthly’, and the ‘Template’ to the name of the new template that you just created, then click ‘Add.’

  3. You should now have two options under the ‘Monthly’ archive type. Switch over to the new archive template that you just created, and put the following in the ‘Archive File Template’ box:

    export/.txt

  4. Click the ‘Rebuild Site’ option, choose the ‘Rebuild Monthly Archive Only’ option, and click the ‘Rebuild’ button.

    Once MT is done rebuilding, you should have a series of files inside an ‘export’ directory inside your site’s archives directory (in my case, that ended up being /longletter/archives/export/, your configuration may be slightly different). There will be one file for each month, named something like 2003-07.txt.

  5. In TypePad, under the ‘Manage’ tab for your weblog, choose the ‘Import/Export’ option. In box A, put in the URL for your first month’s export file (for me, this was http://www.djwudi.com/longletter/archives/export/2000-11.txt). Leave the ‘Encoding’ drop-down menu set to ‘Unicode’, and hit the ‘Import’ button.

  6. There is no step 6. You’re done!

So that’s it. Now that I can go month by month, I’ll import one month, go through each post to make sure all the links are correct, then move on to the next month. This will probably take a while, as I’ve got close to three years of posts to check, but I’m on my way!

And the word ‘PROJECT’ flashed before my eyes…

Custom MT skins?

Custom MT interface

So it appears that SocialDynamX, creators of FMRadio for Radio Userland (Disclaimer: I know nothing about either of these products) is working on creating a custom interface for MovableType.

First impression? Ugh, that’s horrid.

Now, I’m a little unclear from looking at their site as to whether that’s a replacment for the default MT interface that you see in your web browser (as is implied by the term “skin”), or whether it’s a seperate standalone program for posting to MT (such as Kung-Log, UserSpace or Zempt). If it’s a standalone program, then okay, it’s most likely Windows-based, and the horrid ugly interface makes sense. But if it’s a “skin” designed to replace the standard MT interface within the browser — why is it so verschluggene ugly?

I was going to go into more detail, but I’ve gotta head off to work, and I’m out of time. Judge for yourself, I guess. ;)

(via Scoble)

About 'Noises'

I wanted to take a moment to draw attention to the ‘Noises’ section of the sidebar to the left of this page. I’m tossing albums up there at more or less random intervals (often determined by what I’m listening to at any given point in the day). When I do, though, I’m highlighting three key tracks from the album and adding streaming audio ‘PLAY’ links to them, in addition to one for the full album.

The albums won’t stay up indefinitely, and the tracks aren’t downloadable (streaming only, sorry), but this should let anyone stopping by take a quick listen to whatever I’m recommending — and, of course, clicking through the picture lets you buy it from Amazon.

Enjoy!

My MovableType/TypePad History

On October 2, 2001, Ben and Mena Trott gave an interview regarding their newly announced weblogging program, MovableType.

On October 8, 2001, MovableType v1.00 was released to the public.

On December 21, 2001, I started using MovableType for my weblog. This would have been v1.31 at the time.

On April 23, 2003, TypePad was announced and the TypePad site went live with some teaser info on the new service.

On June 24, 2003, TypePad beta testing was announced. I, along with many other people, applied for a spot in the next round of testing.

On July 7, 2003, I was notified that I had a new toy to play with. ;)

The point to all this? No point at all, really. Just kind of cool knowing that I’ve been doing my small part to help the Trotts take over the world almost since the beginning. Not quite from the very beginning, but pretty durn close.

TrackBack spam? Grrrr…

Well, here’s a first (for me, at least) — I just got TrackBack spam. One of the posts on my other site — this one, to be precise — just got a TrackBack ping (which I’ve just deleted) with no information other than a URL pointing to, of all places, the Thessaloniki Port Authority (http://www.thpa.gr/ — I’m not giving them the Googlejuice of a live link).

Bad enough that they used TrackBack to spam me, but the Thessaloniki Port Authority? That’s just wierd. And on a computer-related humor post, too. Just bizarre.

TPBETA 1505

TPBETA 1505

My own little concept for marking my spot as a TypePad beta tester. A small badge, with ‘TPBETA’ on the left, and ‘1505’ on the right. 1505 is the ID number for my TP blog — obviously, the older the blog, the lower the ID number will be. Just another idea to toss into the mix of ideas running around right now. ;)

On the off chance anyone wants to duplicate this, I used the Kalsey Button Maker with the following settings:

  • Outer border: 666666
  • Inner border: ffffff
  • Bar position: 50 pixels from left
  • Left box:
    • Text: tpbeta
    • Background: 006699
    • Text color: ffffff
    • Text start: 5 pixels from left
  • Right box:
    • Text: 1505
    • Background: dddddd
    • Text color: 000000
    • Text start: 4 pixels from the bar

Update (prompted by Grumpy’s comment): You can find your blog ID# by logging into your TypePad admin page, going to your weblog editing screen, and checking the address bar of your browser. The end of the URL will look something like blog_id=1505 — there you go!

TPS Syndrome

Am I suffering from TPS: TypePad Snobbery? You know it, baby! ;)

Common symptoms discovered so far:

Live Comment Previews

The ‘Live Comment Preview’ hack that I use on The Long Letter has now been implemented here on Eclecticism. If you know what I’m talking about, then we’re good to go. If you don’t know what I’m talking about, then click on the “Comments” link to any post, type something in the comment box, and look just below the comment box. It’s a nifty trick. ;)

I originally picked this up from ScriptyGoddess, with help from Phillip. Geeky tech details on my implementation here follow.

All this is is a nice little JavaScript addition to the page. I don’t believe that this will constitute a security risk, but I’m no expert, so use at your own risk. ;) Obviously, if you do want to use this on your site, you’ll need to have access to your templates.

In the header of the individual entry template, just after the already included JavaScript bits, I added the following code:

<script type="text/javascript">
 var newline = /n/g;
 function ReloadTextDiv() {
  var NewText = document.getElementById("text").value;
  NewText = NewText.replace(newline, "<br />");
  var DivElement = document.getElementById("TextDisplay");
  DivElement.innerHTML = NewText;
  }
</script>

Then, in the body of the template, just after the closing </div> tag following the preview and submit buttons, but before the </form> tag, I added the following:

<br />
<h2>Live Comment Preview:</h2>
<span id="TextDisplay">Note: if you're comfortable with HTML, feel free to use it in your comments. If not, just type away. Single returns will be automatically converted into linebreaks (&lt;br /&gt;), double returns will be converted into paragraph breaks (&lt;p&gt;). This text will disappear as soon as you start typing.</span>

Lastly, in the textarea tag that defines where the comment text is entered in by a visitor, I added a onkeyup="ReloadTextDiv();" declaration. The full textarea tag should look as follows:

<textarea tabindex="4" id="text" name="text" rows="10" style="width: 80%;" onkeyup="ReloadTextDiv();">

What all this does is actually simple enough. As a visitor enters their comment into the comment box, each time they release a key the onkeyup function calls the ReloadTextDiv JavaScript snippet that I added. This function loads any text inside the comment box (identified by its ID of "text"), replaces any carriage returns with <br /> tags so that line breaks appear correctly, then writes the output into the element identified as "TextDisplay" — in this case, between the span tags I added after the submit and preview buttons.

If you find this useful, feel free to use it in your own pages. While I wouldn’t refuse credit, it really does belong to ScriptyGoddess and Phillip. Enjoy!