Improving Wetware

Because technology is never the issue

Backup script for typo blogs

Posted by Pete McBreen 14 Feb 2007 at 08:42

Ruby script for backing up blogs is here. Feedback from testers is appreciated.

Your blog is saved into a YAML file and can either be uploaded back to the original blog or a different one.

Backup or Restore the content of a blog to/from YAML whose host server supports the MetaWebLog API. (Currently supports typo|wordpress|blogger)

Script was originally created by Derek Mahar for migrating posts between blogs and then changed extensively to serve as a backup/restore utility by Pete McBreen

Sample command lines (program prompts for blog password)

ruby backup\_blog.rb username improvingwetware.com backup.yaml 25 typo backup

ruby backup\_blog.rb username improvingwetware.com backup.yaml num\_posts typo restore

(the num_posts argument is unused on restore)

Note: typo has bug whereby it ignores createdDate when creating URL, but does show correctly posted x days ago. Clicking on the link on the home page fails but it generates feed OK — puzzling — not fixed yet.

Code uses the metaweblog API

source_posts = blog_client.call(
      "metaWeblog.getRecentPosts",
      blog_id,
      username,
      password,
      post_count)

and then saves the posts to a YAML file

f = File.new(backup_filename, "w")
f.puts source_posts.to_yaml
f.close

Tools are interesting, important, and irrelevant

Posted by Pete McBreen 08 Feb 2007 at 12:52

My interview for the Sticky Toolkit with Joey McAllister is now online.

The best question was when I was asked about changes I have seen in development over the past few years. This was mainly because One change I have seen for the worse is the habit of producing ravioli documentation… [that just repeats] what the parameters to the method are and what it returns.

Doesn't everyone think about testing like this?

Posted by Pete McBreen 04 Feb 2007 at 02:05

Michael Bolton recently pointed out on an agile testing list that few people think of
Testing as questioning the product in order to evaluate it or Testing as an empirical, technical investigation of the product, done on behalf of stakeholders, with the intention of revealing quality-related information of the kind that they seek.

This is interesting to me because the Testing as finding defects is not very high value and test driven development is a technique to allow developers to think through issues, rather than something that protects the stakeholders interests.

Yes Testing-as-design and Testing-as-confirmation are interesting, but they are not typically the things that make or break a project.