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 02:12:34 +0200 Message-ID: References: <87vd6fj1cb.fsf@gmail.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=54614 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OtUkz-0006XE-Ad for emacs-orgmode@gnu.org; Wed, 08 Sep 2010 20:12:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OtUkx-0005oc-R5 for emacs-orgmode@gnu.org; Wed, 08 Sep 2010 20:12:49 -0400 Received: from lo.gmane.org ([80.91.229.12]:46594) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OtUkx-0005oW-FB for emacs-orgmode@gnu.org; Wed, 08 Sep 2010 20:12:47 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OtUkw-0006KS-44 for emacs-orgmode@gnu.org; Thu, 09 Sep 2010 02:12:46 +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 02:12:46 +0200 Received: from rileyrg by 85.183.18.158 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 09 Sep 2010 02:12:46 +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 "Eric Schulte" writes: > Hey Richard, > > That looks interesting. See the gdoc-write code block defined in the > library-of-babel in the org repo at contrib/babel/library-of-babel.org > which allows saving Org-mode data to google docs using the google > command line. > > Maybe your function would be suitable for addition to the > library-of-babel? I'll clean it up, add customisation options etc and then repost. I'd like to add calendar stuff too but its hard to find reasonable documentation on how to specify specific date/ranges/times for some reason. regards r. > > Cheers -- Eric > > 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."