星期三 二月 11, 2009

I tried to find some backup tools for jroller, some only backs up the recent 30 entries in RSS feed, some does not handul unicode characters. By referring the python/xmlrpclib and MetaWeblog API documents, I wrote a simple backup tool, you could download it here. (But I did not find a good way to get tags for entries.) You may need to modify the global variables, like blogid/user/passwd.
#!/usr/bin/python

import xmlrpclib

blogid = 'yongsun'
user = 'yong.sun@sun.com'
passwd = '**********'
host = 'http://blogs.sun.com'
server = xmlrpclib.ServerProxy(host+'/roller-services/xmlrpc', use_datetime=True)
num = 1000
... ...
... ...
Please note that the passwd is the "Weblog Client API Password", it's probably your original login password, anyway, you could set it in your profile page.

This blog copyright 2009 by yongsun