.r002

As may noticed, this blog was moved to full static pages, thanks to Jekyll , the fantastic page generator.

As well, this procedure also evolves ruby stuffs, which cost about half and day for a newbie like me to sort all these things out. Trying to list all the problems I met below, 所谓以儆效尤啊, lol:

rvm things, so following the topic in last article, version thing does cost a lot of time to deal with. At first, I would like to think that put

rvm list

should list all ruby versions in the system, also include the version that come that from the system. But actually it’s NOT. so use this:

rvm system
ruby -v 
ruby 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin11.0]

Voila.

For import textpattern blog posts to Jekyll, this part is pretty funny though. First, you’ll need to copy the import utility(textpattern.rb) to local disk, and use the ruby file to import all you posts. Grab the open_gem to meet the prerequisite:

gem install open_gem

than

gem open jekyll

On my laptop, this will let vim to open the package structure, open that file and save it into wherever you want. then import data from txp database

ruby -r './_import/textpattern.rb' -e 'Jekyll::TextPattern.process("database_name", "username", "password", "hostname")'

This file’s operation could be tricky, it’s database name was hard coded as “textpattern”, in my previous environment, the database name is txp_textpattern, so be aware of that. And also you may need add a new line

include 'yaml'

in the rb file, cause I met this problem.

TBD.

12 Sep 2011