RWordPress_0.2-3.tar.gz

08 Aug 2012

RWordpress

This is an R package that allows us to interact with a blog. We can

  • query the blog's contents
  • post to the blog, create new pages, upload files
  • get meta-information about the blog and the server.
  • The package is a nice example of the ease with which one can use XML-RPC within R to invoke remote methods with data from within R.

    The following is a table of the R functions and the corresponding XML-RPC method along with a link to its reference documentation.
    R functionXML-RPC API method and link
    categoriesmt.getCategoryList
    deleteCategorywp.deleteCategory
    deletePagewp.deletePage
    deletePostmetaWeblog.deletePost
    getCategoriesmt.getCategoryList
    getCategoryListmt.getCategoryList
    getOptionswp.getOptions
    getPagewp.getPage
    getPageListwp.getPageList
    getPageStatusListwp.getPageStatusList
    getPageswp.getPages
    getPostmetaWeblog.getPost
    getPostCategoriesmt.getPostCategories
    getPostStatusListwp.getPageStatusList
    getRecentPostTitlesmt.getRecentPostTitles
    getTagswp.getTags
    getUsersBlogswp.getUsersBlogs
    newCategorywp.newCategory
    newPagewp.newPage
    newPostmetaWeblog.newPost
    publishPostmt.publishPost
    supportedMethodsmt.supportedMethods
    supportedTextFiltersmt.supportedTextFilters
    uploadFilewp.uploadFile

    I will write some documentation that illustrates how to use this to post an entry to your blog.

    The best thing to do is set the R option WordpressLogin to a vector giving the login and password for your blog.

     options(WordpressLogin = c("duncan" = "mypassword"))
    
    The functions will use that and you won't have to worry about specifying it.
    Duncan Temple Lang <duncan@wald.ucdavis.edu>
    Last modified: Sun Mar 14 09:09:43 PDT 2010