Photos Spare Cycles MythBusters

Category: whoopteedoo: dev

August 1, 2004

Fixing broken MT links after server move/database crash

This entry is for anyone who's tried to move their MovableType installation or had their Berkeley DB crash and discovered that once they resurrect their blog, all of the URLs for their entries have changed. MovableType 3.0 fixes this problem by changing how URLs for entries are created, but their are plenty of people out there who still feel the pain (MovableType 2.x users may wish to innoculate themselves).

meta's database crashed a couple weeks ago, which means that a lot of her older entries were no longer displaying properly nor were comments working properly on those older entries, so I wrote a quick script that is similar to the innoculation technique above. This script can be used to 'fix' broken links after a Berkeley DB crash, or it can be used to move your entries from one server/host to another. It requires that you have the old monthly archive pages pre-crash/move, and once it's done it creates a single file that you have to upload to your Web server. That's it.

I've included the source code of this program in the full entry, but I don't expect people who find this entry to know how to pull apart the code, because if they did, then they would probably be able to write it themselves, so feel free to leave me a comment if you find yourself in a situation similar to the one described here and I'll tailor it to your needs.

I mostly did this because it took less than 30 minutes, and I really need to practice my python.

Continue reading "Fixing broken MT links after server move/database crash" »

June 30, 2004

Subscribe to comments bookmarklet (Yahoo and Bloglines)

As a follow-up to bp's entry on RSS Comments, I now give you a bookmarklet for bloglines and My Yahoo! users that will let you subscribe to RSS comments:

Subscribe to Comments (Bloglines)

Subscribe to Comments (My Yahoo!) (NOTE: you must add the RSS Headlines content to your My Yahoo! page)

Of course, bp's site is the only site supporting RSS comments right now, but I plan to add that feature to every movabletypo site, as well as (when the real server comes back online).

Update: added My Yahoo! bookmarklet.

RSS Comments

Moving means that I don't get to help bp with setting up RSS comments with MT other than exchange links and ideas over IM, but I'm hoping to have support for this soon in the feed aggregator for (currently disabled due to DSL being shut off).

Side note: I have the code for the feed aggregator on a flash drive, so hopefully all systems will return to 'normal' by tomorrow.

February 7, 2004


Following quickly on the heels of xanga2mt, I know bring you tripod2mt. As you might be able to guess, it will convert the contents of a tripod journal into Movable Type's import format. It's not quite as good as xanga2mt; it should get all the public postings off of your page, but it is not able to grab your comments.

The fruits of the labor from these two scripts is now online: honeyfields' xanga and tripod entries have now been copied over to the new community server that we're setting up. As payment, she is now our guinea pig.

This is probably the last of the scraping scripts, though I am helping cshell move her account over from blogspot. Although Movable Type has instructions for doing this, last time when we tried it with redchilipepper it didn't work so well. blogspot is also one of those annoying blogging tools that has no notion of an entry title.

February 2, 2004


Like the title of this entry implies, this Python script will scrape an entire Xanga feed and convert it into MovableType's input format. The intended audience for this script is people who are on Xanga, but either have or are in the process of moving over to MovableType.

I don't actually fall into the intended audience of this script, which makes it strange that I would write it, but I do have good motivations:

1) I needed to learn Python for work
2) I needed to learn regular expressions for work
3) I am going to reused this code to add in some new features to the feed aggregator so that it can display comments
4) MovableType is my uber tool, and everyone should be free to use it without cell phone number portability issues :)

I've only tested this on two Xanga accounts. If you have a really weird Xanga modifications, then this will most likely break. Version 0.1 contains one or two bugs, so the program will report ~2 errors when it's done. If there's interest, I'll put out a version 0.2 that fixes these bugs, plus any others that people find.

BTW - while I was injured I also taught myself a bit of Perl over the break, and then decided that learning Python and Perl at the same time was a really, really, bad idea.

So, without further adieu:
xanga2mt release 0.3

Update: upgraded to version 0.2, which fixes bugs with comment scraping

Update: upgraded to version 0.3, which contains a small fix to make the script compatible with more sites

Feed Updater III

Fixed some easy bugs in the updater. Some of the layout bugs have been fixed, and I also fixed a bug in a third-party date parser I was using. I also added a link at the bottom that lets you reload your profile, and all the LiveJournal feeds get to look hella cool with their own profile images.

I had a good discussion with daveXtreme on his smart bookmarks thread about aggregators, and more specifically, different techniques for informing a person when a comment has been added to a thread. daveXtreme's smart bookmarks suggestion is a browser-based solution, where the browser itself would change the appearance of bookmarks based on how recently they've been updated. It's a good idea, but it's also one beyond my abilities.

In our follow-up discussion, daveXtreme mentioned:

What I'd like to see in LJ is a special tab or something to switch between "Post view" and "comment view." Post view would work as normal, with newer posts appearing at top. Each post would have a little button I could press (or something, implementation would have to be worked out) that would add it to Comment view. Comment view posts would move to the top of the list whenever a new comment is added to them ("thead bumping") so that I can track discussions I'm intereted in.
This made me think more about different ways of displaying comments within the aggregator, as well as ways to indicate that you wanted to subscribe the a thread. I had been thinking mainly about the bookmarklets route for subscribing to comment threads, but I now realize that there are a lot of possibilities for including the subscription process on the aggregator page itself. I think there needs to be both, as it seems that the sites I comment on aren't ones that I would include in the aggregator (I use bloglines for my newsreads). The possibility of having separate posts/comments view also seems interesting, though, even in the posts view, I think I would want to see comments, but perhaps only the last n.

Another thing he proposed was:

Going with the Smart Bookmarks theme, this could happen outside of a webpage in a sidebar or drawer in your browser. You'd have a "My Threads" folder that would refresh whenever a new comment is left. This would have the advantage that a server wouldn't have to build a new page for each person's particular aggregated thead views.
I hadn't thought about doing a "mini" sidebar version of the aggregator, but now that I think about it, it would be very easy. As new comments are added, you would see a note in the "mini" view indicating this, with a link to the full comment/thread. Mozilla even has a feature where you can set a bookmark to load in the sidebar instead of the browser.

what is this?

This page contains an archive of all entries posted to kwc blog in the whoopteedoo: dev category.

trips is the previous category.

whoopteedoo: misc is the next category.

Current entries can be found on the main page.