emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Blogging org entries using google command line.
@ 2010-09-08 21:11 Richard Riley
  2010-09-08 22:32 ` Eric Schulte
  2010-09-09  0:30 ` Tim Burt
  0 siblings, 2 replies; 11+ messages in thread
From: Richard Riley @ 2010-09-08 21:11 UTC (permalink / raw)
  To: emacs-orgmode


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."

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2010-09-12 16:57 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-08 21:11 Blogging org entries using google command line Richard Riley
2010-09-08 22:32 ` Eric Schulte
2010-09-09  0:12   ` Richard Riley
2010-09-09  0:30 ` Tim Burt
2010-09-09  1:05   ` Richard Riley
2010-09-09  2:04     ` Tim Burt
2010-09-09  3:35       ` Richard Riley
2010-09-10  8:01         ` Yavuz Arkun
2010-09-10 17:00           ` Richard Riley
2010-09-12 16:40         ` David Maus
2010-09-12 16:57           ` Richard Riley

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).