Blog on Blog
Moving Stuff Finished :-)
Yesterday evening I followed the excellent instructions from the WordPress Codex on Migrating from Movable Type to WordPress. This proved to be extremely easy with all the posts, categories and comments coming through perfectly.
I had some files (photos, ppt etc) manually uploaded, so logged in to move those over. As well as migrating I moved the blog from /blog/ up to the root of the site. That all went swimmingly and I picked a nice shiny new theme called demar.
The only thing left was to sort out redirects for all the old links - so I don’t lose all the link love I’ve managed to build up over the years.
After reading through the various options I had a few issues. I’d tinkered a bit with the MT URLs in the past and had a lot of legacy stuff hanging around. I decided I’d just do it with apache’s .htaccess. Not a choice for everyone, but my regex skills aren’t too shabby, so I figured I’d start there.
The URLs fell into a few different patterns:
/blog/atom.xml, index.xml, etc - the feeds. For now these can all redirect to /feed/ so we start with
RewriteEngine On
RewriteRule ^blog/atom.xml$ /feed/ [L,R=301]
RewriteRule ^blog/index.rdf$ /feed/ [L,R=301]
RewriteRule ^blog/index.xml$ /feed/ [L,R=301]
Feeds dealt with I moved on to the root of the blog, adding
RewriteRule ^blog/$ / [L,R=301]
RewriteRule ^blog$ / [L,R=301]
and then onto the archives, where we start to get trickier. First we have categories which take the form /blog/archives/cat_somewhere_I_put_stuff.html. WordPress creates a different pattern by default - /categories/somewhere-i-put-stuff. Not too hard, first we pull out the words, then glue them back together again.
RewriteRule ^blog/archives/cat_([^_]*)_([^_]*)_([^_]*)_(.*)\.html$ /category/$1-$2-$3-$4 [L,R=301]
RewriteRule ^blog/archives/cat_([^_]*)_([^_]*)_(.*)\.html$ /category/$1-$2-$3 [L,R=301]
RewriteRule ^blog/archives/cat_([^_]*)_(.*)\.html$ /category/$1-$2 [L,R=301]
RewriteRule ^blog/archives/cat_(.*)\.html$ /category/$1 [L,R=301]
Each of these regexs pulls out categories of 4 words long, 3 words, 2 words and 1 word respectively. If you have categories with more words in then you’ll need to add longer versions of these, ordering them longest first.
Next the monthly archives, in MT /blog/archives/2004_04.html and in WP /2004/04/
RewriteRule ^blog/archives/([0-9]{4})_([0-9]{2})\.html$ /$1/$2/ [L,R=301]
easy enough.
Then we have the individual posts. These fall into two groups, name based files and numbered files. The name based files are all /blog/archives/categoryname/postname.html. I had thought these were going to be a pig, but I discovered completely by accident that if you simply use the postname part of that then WordPress figures out which post you meant and redirects to its nice new WP URL. Sweet.
RewriteRule ^blog/archives/[^/]*/(.*)\.html$ /$1 [L,R=301]
The exception to this turns out to be posts that have a hyphen in the name. MT strips the hyphen, leaving WP with a name that doesn’t match. I put a rule in specifically for the one post I have that was affected:
RewriteRule ^blog/archives/personal/beijing_sightse.html$ /2008/05/04/beijing-sight-seeing/ [L,R=301]
Which just leaves the numbered posts: /blog/archives/000217.html. The numbered entries proved to be tricky. While you can just append the number /1234 like so and WordPress will fid a post for you, the posts weren’t matching up. As many of these had been indexed by Google and linked by others I wanted to hook them up to the right posts.
Fortunately I had Movable Type still rendering my site as static HTML files, so with a quick bit of bash magic I pulled out the numbered posts and made rules to map them to the Movable Type post name based permalinks (which we already did rewrite rules for above):
find . -type f \
| grep "^\./[0-9]*\.html$" \
| xargs grep permalink \
| awk ‘{print $1 " " $17}’ \
| sed -e ’s%^\./%RewriteRule ^blog/archives/%’ \
-e ’s%\.html:%.html$%’ \
-e ’s%href="http://www.dynamicorange.com%%’ \
-e ’s%">Permalink</a><br%%’ \
> rules.txt
Each line of rules.txt ends up looking like this
RewriteRule ^blog/archives/000285.html$ /blog/archives/semantic-web/vocabs.html [L,R=301]
which results in a second redirect to just /vocabs and then a third as WP works out where to take you finally. Not great to be bouncing around so much, but much better than losing the link.
Good luck if you decide to make the same move.
Been Away Too Long
life’s been a little hectic this year, having been away 7 times in the first 6 months. Being back in the country I’ve been spending free time with my wife and 3 little cherubs rather than here blogging for whoever’s reading.
But I have still been blogging, along with Richard, Paul, Ian and Danny I’ve been blogging for work on both Panlibus and Nodalities. If I’m not here then you may catch me there.
Technorati Tags: Talis
ah, now I can read
I’ve been using FeedReader for a while (I prefer email style new to river of news) and it works really well. The interface is calm and it fits the way I work. But a few months back I upgraded my laptop to a higher res one, 1920×1200 in just 15.4″. This looks great, but I do end up making text larger in a few of my apps. I wanted to change that text size in FeedReader and I couldn’t find it anywhere. Then I remembered that the preview pane in FeedReader is just an embedded browser - I wonder… Sure enough, C:\Program Files\FeedReader30\stylesheet contains atom.xsl, emailstyle.xsl and custom(delicious.xml); a quick tweak from
body {
font-family: verdana, tahoma;
font-size: 0.7em;
line-height: 1.3em;
padding: 0;
margin: 0;
}
to
body {
font-family: verdana, tahoma;
font-size: 1.0em;
line-height: 1.3em;
padding: 0;
margin: 0;
}
in both atom and emailstyle and all looks lovely :->
Professionalism at play
Euan Semple, the BBC’s director of Knowledge Management, says… this
Read this guy’s blog, he’s good and clearly very professional.
Comment Spam
I’ve always kept comments switched off on my online ramblings due to the threat of abuse. Now, it appears, Six Apart (writers of Movable Type which powers my blog and TypePad, the hosted blog service) have introduced TypeKey. TypeKey is an online identity specifically designed for commenting on blogs and is integrated with Movable Type.
Great - now I just have to work out how to install it and how to edit all the comment templates to make them fruity.
Testing Meme Propagation In Blogspace: Add Your Blog!.
Testing Meme Propagation In Blogspace: Add Your Blog!. –
This posting is a community experiment that tests how a meme, represented by this blog posting, spreads across blogspace, physical space and time. It will help to show how ideas travel across blogs in space and time and how blogs are connected. It may also help to show which blogs are most influential in the propagation of memes. The dataset from this experiment will be public, and can be located via Google (or Technorati) by doing a search for the GUID for this meme (below).
The original posting for this experiment is located at: Minding the Planet (Permalink: http://novaspivack.typepad.com/nova_spivacks_weblog/2004/08/a_sonar_ping_of.html) ? results and commentary will appear there in the future.
Please join the test by adding your blog (see instructions, below) and inviting your friends to participate ? the more the better. The data from this test will be public and open; others may use it to visualize and study the connectedness of blogspace and the propagation of memes across blogs.
The GUID for this experiment is: as098398298250swg9e98929872525389t9987898tq98wteqtgaq62010920352598gawst (this GUID enables anyone to easily search Google (or Technorati) for all blogs that participate in this experiment). Anyone is free to analyze the data of this experiment. Please publicize your analysis of the data, and/or any comments by adding comments onto the original post (see URL above). (Note: it would be interesting to see a geographic map or a temporal animation, as well as a social network map of the propagation of this meme.)
INSTRUCTIONS
To add your blog to this experiment, copy this entire posting to your blog, and then answer the questions below, substituting your own information, below, where appropriate. Other than answering the questions below, please do not alter the information, layout or format of this post in order to preserve the integrity of the data in this experiment (this will make it easier for searchers and automated bots to find and analyze the results later).
REQUIRED FIELDS (Note: Replace the answers below with your own answers)
* (1) I found this experiment at URL: http://www.twelve71.com/archives/000657.html
* (2) I found it via ?Newsreader Software? or ?Browsing the Web? or ?Searching the Web? or ?An E-Mail Message”: Newsreader Software
* (3) I posted this experiment at URL: http://www.dynamicorange.com/blog/
* (4) I posted this on date (day, month, year): 04/08/04
* (5) I posted this at time (24 hour time): 11:55 GMT
* (6) My posting location is (city, state, country): Birmingham, England
OPTIONAL SURVEY FIELDS (Replace the answers below with your own answers):
* (7) My blog is hosted by: Magic Moments
* (8) My age is: 30
* (9) My gender is: Male
* (10) My occupation is: Geek
* (11) I use the following RSS/Atom reader software: SharpReader
* (12) I use the following software to post to my blog: MovableType
* (13) I have been blogging since (day, month, year): 17/07/99
* (14) My web browser is: FireFox
* (15) My operating system is: Microsoft Windows XP
Search
Right Now (ish)
- /me has gone home, feeling all coldy. must be man-flu 2 days ago
- #mashlib08 paul bevan from nlw telling us about cool stuff they're trying to do 6 days ago
- @andypowe11 I can haz duster slippers? http://tinyurl.com/5v6ds8 for teh kittens, k thx bye in reply to andypowe11 6 days ago
- More updates...
Categories
- .Net Technical
- Blog on Blog
- commands I have issued
- Enterprise Architecture
- event
- Fiction Book Review
- Food
- Interaction Design
- Internet Social Impact
- Internet Technical
- IP Law
- Library Tech
- Music
- New Toy
- Non-Fiction Book Review
- Other Technical
- Personal
- Random Thought
- Resourcing
- Security And Privacy
- Semantic Web
- Software Business
- Software Engineering
- Talis Technical
- Uncategorized
- Working at Talis
- [grid::blogpaper]
- [grid::fatherhood]
Archive
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- January 2008
- December 2007
- November 2007
- October 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- September 2006
- August 2006
- June 2006
- February 2006
- January 2006
- December 2005
- November 2005
- September 2005
- August 2005
- July 2005
- June 2005
- May 2005
- February 2005
- January 2005
- December 2004
- November 2004
- October 2004
- September 2004
- August 2004
- July 2004
- June 2004
- May 2004
- April 2004
- March 2004
- February 2004
- December 2003
- November 2003
- August 2003
- July 2003
- June 2003
- May 2003
- March 2003
- January 2003
- May 2002
- March 2002
- August 2001
- May 2001
- April 2001
- January 2001
- December 2000
- November 2000
- December 1999
- November 1999
- July 1999