From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Riley Subject: Blogging org entries using google command line. Date: Wed, 08 Sep 2010 23:11:18 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from [140.186.70.92] (port=36128 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OtRz1-0006et-DJ for emacs-orgmode@gnu.org; Wed, 08 Sep 2010 17:15:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OtRz0-0004eB-6Y for emacs-orgmode@gnu.org; Wed, 08 Sep 2010 17:15:07 -0400 Received: from lo.gmane.org ([80.91.229.12]:35591) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OtRyz-0004e1-Ty for emacs-orgmode@gnu.org; Wed, 08 Sep 2010 17:15:06 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OtRyx-0006W9-Pc for emacs-orgmode@gnu.org; Wed, 08 Sep 2010 23:15:03 +0200 Received: from 85.183.18.158 ([85.183.18.158]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 08 Sep 2010 23:15:03 +0200 Received: from rileyrg by 85.183.18.158 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 08 Sep 2010 23:15:03 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Using the google command line you can get some super access to all your Google resources - including docs, calendars & blogs. http://code.google.com/p/googlecl/ Once you have installed it and set up your OAUTH you can easily manipulate/add/delete things in your google hosted data. While not polished and featuring hard coded blog name the following function uses the google command line tool to blog the current org-entry. --8<---------------cut here---------------start------------->8--- (defun rgr/org-blog-entry () (interactive) (save-excursion (let ((tmpheading (org-get-heading))) (goto-char (org-entry-beginning-position)) (set-mark (org-entry-end-position)) (let*((tmpfile (make-temp-file "org-blog-html-")) (blog-command (concat "google blogger post --blog \"Open Sauce\" --title '" tmpheading "' " tmpfile ))) (org-export-as-html 1 nil nil (find-file-noselect tmpfile) t) (with-current-buffer (get-file-buffer tmpfile) (save-buffer)) (start-process-shell-command "Google Blog" "*googlecl*" blog-command))))) --8<---------------cut here---------------end--------------->8--- At some point I'll try and make it more generic with customised options if no one beats me to it .. regards r. -- ☘ http://www.shamrockirishbar.com, http://www.richardriley.net "Learning French is trivial: the word for horse is 'cheval' and everything follows thusly."