Tuesday, September 14, 2010

Now org-googlecl supports deleting of existing entries

If you try to blog a title that exists you can examine it and/or
delete prior to blogging the new version. See link in footer for git

(if googlecl-blog-exists
(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 (nth 0 (org-split-string blogurl))))
(setq blogurl (nth 0 (org-split-string blogurl)))
(if (y-or-n-p "Delete existing blog entry?")
(let ((delcommand (format "yes y | google blogger delete --blog '%s' --title '%s'" googlecl-blogname btitle)))
(message "Delete command is : %s" delcommand)
(call-process-shell-command delcommand))))))))

My Emacs Files At GitHub

No comments:

Post a Comment