Post what you downloaded to your wp blog

Come up with a useful post-processing script? Share it here!
Post Reply
User avatar
Warking
Newbie
Newbie
Posts: 3
Joined: April 3rd, 2010, 1:08 pm

Post what you downloaded to your wp blog

Post by Warking »

Code: Select all

import wordpresslib
url = 'http://www.mywpblog.com/xmlrpc.php'
wp = wordpresslib.WordPressClient(url, 'SomeAuthor', 'Someauthorpassword')
wp.selectBlog(0)
post = wordpresslib.WordPressPost()
post.title = 'Look at that, I love being a pirate'
post.description = '''$2,$1,$3 (or whatever command) blah blah blah blah
Google
Blah blah
'''
post.categories = (wp.getCategoryIdFromName('Mydownloads'),)
idPost = wp.newPost(post, True)
NOTE: You need wordpresslib.
Last edited by Warking on April 9th, 2010, 4:22 pm, edited 1 time in total.
User avatar
Warking
Newbie
Newbie
Posts: 3
Joined: April 3rd, 2010, 1:08 pm

Post what you downloaded to your wp blog

Post by Warking »

Ok, so maybe i need this post to add info, i will grab it.
Last edited by Warking on April 9th, 2010, 4:23 pm, edited 1 time in total.
Post Reply