As you who had used windows live write to write blogs to micolog may confused that you got a error method "mt.getPostCategories" is not supported when archiving a post from blog.So that it would be a little uncomfortable to repost your articles.But here is the solution:

Alter api_rpc.py:

Firstly,Find the def wp_getPageList(blogid) and add a method under it:

def mt_getPostCategories(blogid,username,password): 
       post=Entry.get_by_id(int(blogid)) 
       categories=post.categorie_keys 
       cates=[] 
       for cate in categories:
           cates.append({  'categoryId' : cate.id_or_name(),
                       'parentId':0, 
                       'description':cate.name(),
                       'categoryName':cate.name(),
                       'htmlUrl':'',
                      'rssUrl':'' 
                       }) 
    return cates

Then find 'mt.setPostCategories':mt_setPostCategories

add a new line 'mt.getPostCategories':mt_getPostCategories .Don’t forget a comma at the end of the pre_line.When you’ve done it would perform like this:

'mt.setPostCategories':mt_setPostCategories,
'mt.getPostCategories':mt_getPostCategories

 

The deep red line of all of the above are what you would apply to.

Simply cause the micolog developer almost prepared everything in the XmlRPC API except the getPostCategories method which is indispensable.

Tags: Micolog WLW XMLRpc

Posted in Google App Engine |

Add New Comment

2+6