My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Featured
Downloads
Links

CL-BLOGGER is a Common Lisp interface to Blogger.com, it also provide a convenient way to post a native muse file in emacs.

Japanese document -> http://read-eval-print.blogspot.com/2008/04/blog-post_30.html

Write with Emacs Muse and Post it to Blogger(Common Lisp interface to Blogger) Outline

Anyway, I wanted to post from Emacs to Blogger. I wanted to write with Muse. Simple-hatena-mode was envied. Thus, I made this program.

The following is possible.

- Post a new entry. - Modify a entry which has be posted by this program

Troublesome point

- It is necessary M-x slime, beforehand, because it use SLIME. - Because "post-id" is joined to the tail of file after posting,

it is necessary to reopen a file on Emacs. - The Muse file synchronizing of what edited on the Web and the local cannot be taken. - There is no notification for completion of posting, except SLIME repl buffer.

Dependencies

  • Emacs
  • Emacs Muse
  • SBCL
  • SLIME
  • Drakma
  • CL-PPCRE
  • S-XML

It is easy to use asdf-install to install Drakma etc.

CL-USER> (require :asdf-install) ("ASDF-INSTALL") CL-USER> (asdf-install:install :drakma) Install where? 1) System-wide install:

System in /usr/lib/sbcl/site-systems/ Files in /usr/lib/sbcl/site/
2) Personal installation:
System in /home/ancient/.sbcl/systems/ Files in /home/ancient/.sbcl/site/
--> 2

Please input 2 here.

No key found for key id 0x#1=595FF045057958C6. Try some command like

gpg --recv-keys 0x#1#
of type ASDF-INSTALL::KEY-NOT-FOUND

Restarts:

0: [SKIP-GPG-CHECK] Don't check GPG signature for this package
  1. ABORT Return to SLIME's top level.
2: [TERMINATE-THREAD] Terminate this thread (#<THREAD "repl-thread" {10034FE621}>)

Please Input 0. Then install cl-ppcre etc. similary.

(asdf-install:install :cl-ppcre) (asdf-install:install :s-xml)

Or clbuild is good for installing those dependencies. Install Getting

Check out by svn. And copy dot.blogger.lisp to ~/.blogger.lisp

$ mkdir ~/lisp $ cd ~/lisp $ svn checkout http://cl-blogger.googlecode.com/svn/trunk/ blogger $ cd blogger $ cp dot.blogger.lisp ~/.blogger.lisp

Modify ~/.blogger.lisp

modify ~/.blogger.lisp. A content is as follows.

author

user name
email
email address
passwd
password for blogger
blog-id
blog id

The blog id is a value of blogId in html sourec of your Blogger.

<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://www.blogger.com/rsd.g?blogID=1096313046657120208">
</link>

Add a path to asdf:central-registry

In ~/.sbclrc, add the directory that there is blogger.asd to asdf:central-registry.

(pushnew (merge-pathnames #p"lisp/blogger/" (user-homedir-pathname))

asdf:central-registry :test #'equal)

Modify ~/.emacs

add the following two lines to ~/.emacs.

(setq load-path (cons (expand-file-name "~/lisp/blogger") load-path)) (autoload 'blogger-post "blogger" "Blogger Post" t)

How to use

First, please start SLIME in Emacs with M-x slime.

Please edit a blog content by the format of Muse.

Start the first line by "# title". When posting, it uses it as a title.

The label can be specified for the line that starts by ; labels: . Delimit each label by the comma.

#title Title of a entry

contents...

; labels: blog, Common Lisp

Don't insert any space before ;.

Then post it with M-x blogger-post.

Post ID is added to the tail of Muse file, So please reopen the Muse file with C-x C-v etc. To maintain post ID, the following lines are added.

; post-id 3534792244000900117

M-x blogger-post becomes a replacement of an existing entry when there is a line of post ID like the above-mentioned.

Powered by Google Project Hosting