Before, the beautiful Jenna:

And now:

I believe these pictures are not much over a year apart.
For more see Hollywoodtuna.


Technorati Tags: idea
Then I ended up with this script:--- client.rb (revision 24)
+++ client.rb (working copy)
@@ -147,6 +147,7 @@
xmlFragment.instruct!
xmlFragment.tag!("entry","xmlns"=>"http://www.w3.org/2005/Atom","xmlns:app"=>'http://purl.org/atom/app#') do | doc |
doc.title(@title,:type=>'text')
+ doc.published(@published)
doc.content(@content,:type=>'html')
doc.tag!("author") do | author |
author.email @author_email
@@ -242,7 +243,7 @@
#if no links are specified, then return an error!
if links.nil?
- raise ArgumentError "links parameter is required!"
+ raise ArgumentError("links parameter is required!")
end
#look for the 'service.post' value
Several constants have to be set at the start of the script. Then it should go through and pull the posts out of your old blog and dump them into blogger. It does assume the old blog used Textile for formating and converts every post body to html. Also it doesn't migrate any comments or post tags. Maybe I will get to that later. Thanks to this handy page, I have a nice way to syntax highlight the code.#!/usr/bin/env ruby
#
# Migrate from a MetaWeblog enabled blog to blogger
#
require 'xmlrpc/client'
require 'rexml/document'
require 'rexml/xpath'
require 'time'
require 'rubygems'
require 'RedCloth'
# Checkout http://code.google.com/p/ruby-blogger/ and point to it here
require '/Users/kelp/checkouts/ruby-blogger/lib/client.rb'
# Find this in the of your blogger page source
POST_URI = 'http://www.blogger.com/feeds//posts/default '
EMAIL = 'username@gmail.com'
PASSWORD= 'password'
# What ever user name you post as on blogger
USER = 'username'
OLD_BLOG_URL = "http://example.com/"
OLD_BLOG_URI = "/rpc/"
OLD_BLOG_USER = 'username'
OLD_BLOG_PASS = 'password'
OLD_BLOG_ID = blogid
# Number of posts to migrate
POSTS = number of posts
class Blog
def initialize(host, path, username, password, blog_id = 1, port = 80)
@server = XMLRPC::Client.new(host, path, port)
@blog_id = blog_id
@username = username
@password = password
end
def posts(count = 5)
puts "Getting Posts"
@server.call('metaWeblog.getRecentPosts', @blog_id, @username, @password, count)
end
end
# These should be: old blog URL, old blog URI, old blog username, old blog password, old blog id
oldblog = Blog.new(OLD_BLOG_URL, OLD_BLOG_URI, OLD_BLOG_USER, OLD_BLOG_PASS, OLD_BLOG_ID)
# replace 135 with the number of posts you intend to migrate
oldblog.posts(POSTS).reverse.each_with_index do |post, index|
blogger_post = GData::Post.new
puts "#{index}: migrating post: #{post['title']}"
puts ""
time = post["dateCreated"].to_time
blogger_post.published = Time.parse(time.to_s).xmlschema
blogger_post.title = post["title"]
body = RedCloth.new(post["description"]).to_html
blogger_post.body = body
blogger_post.author_name = USER
blogger_post.author_email = EMAIL
GData::Client.logger.level = Logger::DEBUG
client = GData::Client.new(EMAIL,PASSWORD,{"service.post"=>POST_URI})
client.save(blogger_post)
end
@plek.org::aspmx.l.google.com.:1:1800So far so good. I'm just waiting for tight integration with various Mac apps, Mail, Address Book, iSync, etc.
@plek.org::alt1.aspmx.l.google.com.:5:1800
@plek.org::alt2.aspmx.l.google.com.:5:1800
@plek.org::aspmx2.googlemail.com.:10:1800
@plek.org::aspmx3.googlemail.com.:10:1800
@plek.org::aspmx4.googlemail.com.:10:1800
@plek.org::aspmx5.googlemail.com.:10:1800
'plek.org:v=spf1 a mx include\072google.com, include\072googlemail.com ~all:3600
# Really old B2Evolution blog I used for like 2 daysmod_rewrite really makes my head hurt. I always have to refigure out it's magic. The last problem is all my old URLs won't redirect unless I figure out some real magic since Blogger likes ulrs as 2007/02/article-name and Textpattern did 2007/02/19/article-name. I could do some more rewrite magic, but that stuff just hurts. For now I will just keep the old stuff running for those 3 hits a year it gets.
RewriteRule ^xmlsrv/rss2.php$ http://feeds.feedburner.com/plek [R=permanent,L]
# Old style Textpattern feeds
RewriteCond %{QUERY_STRING} ^(rss|atom)=1
RewriteRule ^(.*) http://feeds.feedburner.com/plek [R=permanent,L]
# New style Textpattern feeds
RedirectPermanent /rss http://feeds.feedburner.com/plek
RedirectPermanent /atom http://feeds.feedburner.com/plek
# Redirect any main page access to the new site
RewriteRule ^$ http://blog.plek.org/ [R,L]
# Keep old Textpattern direct links working
RewriteRule ^(.*) index.php
Technorati Tags: blogging
One of the design goals on the Airbus A380 engine is that the engine housing protect the aircraft (and its passengers) from harm if one of the fan blades breaks off. In the A380 Blade Off Test video, you get to see how it's done.
Technorati Tags: video