From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tim Burt Subject: Re: Blogging org entries using google command line. Date: Wed, 08 Sep 2010 20:30:10 -0400 Message-ID: <87zkvroj1p.fsf@rochester.rr.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=40125 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OtV7g-00027x-2J for emacs-orgmode@gnu.org; Wed, 08 Sep 2010 20:36:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OtUza-0007rQ-3b for emacs-orgmode@gnu.org; Wed, 08 Sep 2010 20:27:55 -0400 Received: from hrndva-omtalb.mail.rr.com ([71.74.56.125]:42754) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OtUza-0007rG-1m for emacs-orgmode@gnu.org; Wed, 08 Sep 2010 20:27:54 -0400 In-Reply-To: (Richard Riley's message of "Wed, 08 Sep 2010 23:11:18 +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: Richard Riley Cc: emacs-orgmode@gnu.org Could Richard Riley have solved my problem? Yes he did. http://naturallogofx.rketburt.org/2010/09/could-richard-riley-have-solved-my.html Thank you, thank you, thank you, Tim Richard Riley writes: > 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. > > (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))))) > > At some point I'll try and make it more generic with customised options > if no one beats me to it .. > > regards > > r.