[Home]
SiteMap Search ElispArea HowTo RecentChanges News Problems Suggestions


Monaco, National Day

WebloggerMode

An Emacs package that implements several blog APIs. The idea is to be able to post and otherwise handle one’s blog entries directly from Emacs with a special tool. Emacs talks to the blog with the aid of XmlRpc (Lisp:xml-rpc.el).

WebloggerMode (weblogger.el) was developed from BloggerMode (blogger.el), which was an implementation of the Blogger API. MarkHershberger is the hands behind this.

Version 1.3 of WebloggerMode lists the following interfaces:

Blogger MetaWeblog? Moveable Type LiveJournal

The mode has a project page on Savannah, see http://savannah.nongnu.org/projects/emacsweblogs. There appears to be no releases yet on 29.10.2006, but version 1.2 of weblogger.el is available from the CVS repository. See the “Source code” -menu on the Savannah page. Version 1.6 is also available at Lisp:weblogger.el.

It remains a mystery why the Savannah project is called emacsweblogs and what the empty (as of 29.10.2006) CVS directory emacsweblogs is planned to contain. Perhaps weblogger.el has been included in the emacsweblogs tree as a base of development work for a yet another phase of development, named “EmacsweblogsMode?”. Who’s to know? Well, MarkHershberger is :)

In any case, after getting WebloggerMode, the user should either run

    M-x weblogger-setup-weblog RET

or define ‘weblogger-config-alist’ manually to define the blogs (s)he wishes to post to.

The version 1.3 is giving me hassle. When trying to post, i get an if: Wrong number of arguments: cdr, 2 error. Also ‘weblogger-next-entry’ or ‘weblogger-prev-entry’ commands yield the same error. I’m succesfully speaking to my Pivot blog, since ‘weblogger-fetch-entries’ does fill the variable ‘weblogger-entry-ring’ and displays the last entry in buffer named *weblogger-entry*. Anyone? --tekonivel/29.10.2006

Edit the function weblogger-api-blogger-get-content in weblogger.el so that is is like so:

    (defun weblogger-api-blogger-get-content (struct)
      "Return the content for this post, optionally inserting the
    title in the first row if weblogger-blogger-firstline-title is
    set."
      (if weblogger-blogger-firstline-title
          (concat "<title>"
              (cdr (assoc "title" struct))
              "</title>\n"
              (cdr (assoc "content" struct)))
        (cdr (assoc "content" struct))))

The change is the last line

    (cdr (assoc "content" struct))))

instead of

     (cdr (assoc "content") struct)))

This is another small patch to weblogger.el 1.3 version. If blog supports another APIs, which is not described in weblogger-no-capabilities, weblogger-determine-capabilities fails to set correct capabilities. – jmjeong

 --- weblogger.el (revision 1002)
 +++ weblogger.el       (working copy)
 @@ -1081,7 +1081,8 @@
      (condition-case nil
        (progn (mapcar
                (lambda (method)
 -                (setcdr (assoc method weblogger-capabilities) t))
 +                (and (assoc method weblogger-capabilities) 
 +                         (setcdr (assoc method weblogger-capabilities) t)))
                (xml-rpc-method-call
                 weblogger-server-url
                 'mt.supportedMethods)))

A link to version 1.3 should be added. I’m using version 1.2, with Emacs 22.1, Drupal 5.0 and Slackware 12, and I get some odd behavior:

When I do M-x weblogger-fetch-entries starting off it doesn’t go into weblogger-entry mode. I have to do M-x weblogger-entry-mode and then M-x weblogger-fetch-entries again to get it to function correctly. If I start emacs and then start something in weblogger-entry mode before starting gnus, gnus malfunctions when it tries to retrieve syndicated feeds (nnrss). If the entry doesn’t start with something in <title> tags it treats the first ten words or so as the title.

Still, in spite of the oddities, it’s a very useful addition to emacs. It’s worth noting, as another usage quirk, that if you’re revising an entry and do C-x C-s (“save”) the entry revises, while if you do C-c C-c (“send”) it will create a new entry.

There is also another version available at http://jwickers.wordpress.com/2007/09/20/webloggerel-enhanced/ which includes the patches listed here and also:

support categories (only for metaWebBlog) fix the date formating for Wordpress (and maybe others)

Please note that i only test it with the Wordpress used on my blog, but feedback is appreciated. There are also some oddities in regard of whether the post get published or not and sometimes may come back as Draft .. so i will go on working on it when i have free time.


CategoryJournaling

EditNearLinks: LiveJournal


You are viewing a mobilized version of this site...
View original page here

How do you rate mobile version of this page?

Mobilized by Mowser Mowser