Showing posts with label googlecl. Show all posts
Showing posts with label googlecl. Show all posts

Tuesday, September 14, 2010

org-googlecl now checks for existing blog entries

;; If the option flag googlecl-blog-exists is set to true we check if there is already an entry with this title.
;; If a blog with the same title exists then give the option to view it via the default browser.

(if googlecl-blog-exists
(with-temp-buffer
(let* ((blogrc (call-process-shell-command (concat "google blogger list --blog '" googlecl-blogname "' --title '" btitle "' url") nil (current-buffer)))
(blogurl (buffer-string)))
(if (not (zerop(length blogurl)))
(if (y-or-n-p (concat "Blog entry exists :" blogurl ". View existing?"))
(browse-url blogurl))))))





--
My Emacs Files At GitHub

expertise

Remote: origin git@github.com:rileyrg/org-googlecl.git
Local: master ~/programming/emacs/org-googlecl/
Head: 0de8b07 Do zerop check on length. How many more times am I going to make that error?!

Stashes:

--
My Emacs Files At GitHub

org-googlecl now checks for exiting blog entries

;; if the option flag googlecl-blog-exists is set to true we check if there is already an entry with this title.
;; if there is give the option to view the existing one.
(if googlecl-blog-exists
(with-temp-buffer
(let* ((blogrc (call-process-shell-command (concat "google blogger list --blog '" googlecl-blogname "' --title '" btitle "' url") nil (current-buffer)))
(blogurl (buffer-string)))
(if (not (zerop(length blogurl)))
(if (y-or-n-p (concat "Blog entry exists :" blogurl ". View existing?"))
(browse-url blogurl))))))

(unless borg (setq bbody
(if (use-region-p)
(region-or-word-at-point)
(read-from-minibuffer "Body:" ))))

--
My Emacs Files At GitHub