From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Riley Subject: Re: Blogging org entries using google command line. Date: Thu, 09 Sep 2010 03:05:40 +0200 Message-ID: References: <87zkvroj1p.fsf@rochester.rr.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from [140.186.70.92] (port=34627 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OtVaV-0000B2-8M for emacs-orgmode@gnu.org; Wed, 08 Sep 2010 21:06:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OtVaR-0004Ip-DS for emacs-orgmode@gnu.org; Wed, 08 Sep 2010 21:06:03 -0400 Received: from lo.gmane.org ([80.91.229.12]:36660) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OtVaR-0004II-2g for emacs-orgmode@gnu.org; Wed, 08 Sep 2010 21:05:59 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OtVaP-0006Wa-9U for emacs-orgmode@gnu.org; Thu, 09 Sep 2010 03:05:57 +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 ; Thu, 09 Sep 2010 03:05:57 +0200 Received: from rileyrg by 85.183.18.158 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 09 Sep 2010 03:05:57 +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 Tim Burt writes: > Could Richard Riley have solved my problem? Yes he did. > http://naturallogofx.rketburt.org/2010/09/could-richard-riley-have-solved-my.html Glad its of some use. It (googlecl) has been on my "must check it out" list for a while ;) Its just at test stage but taking shape - I'm having to relearn elisp again ... I'll "git" (!) it in the next few days. But here's the latest code posted using itself and cleaned up a bit. Note the two defvars to set. You can prefix (C-u) the call to get prompted for the blog name. http://splash-of-open-sauce.blogspot.com/2010/09/improved-code-for-googlecl-blog_08.html As a side note, I intend to create a module org-googlecl (org google command line) with corresponding namespace for customisations. I'm sure then that people more familiar with the publishing portion of org can supe it up a bit more. cheers r. > > 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. > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > -- ☘ http://www.shamrockirishbar.com, http://www.richardriley.net "Learning French is trivial: the word for horse is 'cheval' and everything follows thusly."