Pages

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

Thursday, September 16, 2010

Store existing blogger labels in org item created by the blog search functionality


Updated the list blog functionality to read back the tags from the
blogger entry and add them to the newly created org mode item in case
you cant to refile.




MyUpload.org


(global-set-key (kbd "C-c L") 'googlecl-list-blogs)

(defun googlecl-list-process (proc string)
(with-current-buffer (process-buffer proc)
(delete-region (point-min) (point-max))
(org-mode)
(org-insert-heading)
(insert(format " List of blogs with <%s> in the title\n\n" googlecl-default-title-filter))
(setq string (replace-regexp-in-string "\n$" "" string))
(save-excursion
(let ((items (split-string string "\n"))
(first t))
(while items
(let((item (pop items)))
(org-insert-heading)
(string-match "\\(.*\\),\\(http.*\\),\\(.*\\)$" item)
(insert (format "%s\n %s" (match-string 1 item)(match-string 2 item)))
(let ((taglist (split-string (match-string 3 item) ";")))
(if taglist (org-set-tags-to (add-to-list 'taglist googlecl-blog-tag))))
(if first (progn
(setq first nil)
(org-back-to-heading)
(org-metaright)
(org-end-of-subtree))))))))
(switch-to-buffer (process-buffer proc)))

(defun googlecl-list-blogs ()
"accept a title filter value and then list all blogs which match that value"
(interactive)
(let*((regexpfilter (read-from-minibuffer "Title Contains:" googlecl-default-title-filter) )
(listblogcmd (concat "google blogger list title,url,tags --title \"" regexpfilter "\"")))
(setq googlecl-default-title-filter regexpfilter)
(message "List blog command is : %s" listblogcmd)
(set-process-filter (start-process-shell-command "googlecl-list" "*googlcl blogs*" listblogcmd) 'googlecl-list-process)))




--
My Emacs Files At GitHub

List all blogger blogs whose titles match a regular expression

Added support to list all blogs containing certain regexp.
Create an org-mode buffer so you can refile links etc.

Original code here



(global-set-key (kbd "C-c L") 'googlecl-list-blogs)

(defun googlecl-list-process (proc string)
(with-current-buffer (process-buffer proc)
(delete-region (point-min) (point-max))
(org-mode)
(org-insert-heading)
(insert(format " List of blogs with <%s> in the title\n\n" googlecl-default-title-filter))
(setq string (replace-regexp-in-string "\n$" "" string))
(save-excursion
(let ((items (split-string string "\n"))
(first t))
(while items
(org-insert-heading)
(insert (replace-regexp-in-string ",http:" "\n http:" (pop items)))
(org-set-tags-to googlecl-blog-tag)
(if first (progn
(setq first nil)
(org-back-to-heading)
(org-metaright)
(org-end-of-subtree)))))))
(switch-to-buffer (process-buffer proc)))

(defun googlecl-list-blogs ()
"accept a title filter value and then list all blogs which match that value"
(interactive)
(let*((regexpfilter (read-from-minibuffer "Title Contains:" googlecl-default-title-filter) )
(listblogcmd (concat "google blogger list title,url --title \"" regexpfilter "\"")))
(setq googlecl-default-title-filter regexpfilter)
(message "List blog command is : %s" listblogcmd)
(set-process-filter (start-process-shell-command "googlecl-list" "*googlcl blogs*" listblogcmd) 'googlecl-list-process)))




--
My Emacs Files At GitHub

Wednesday, September 15, 2010

Using the googlecl


http://groups.google.com/group/googlecl-discuss/browse_thread/thread/5bee204f9fe677ca


-----------------


Depends on the task. The "add" task follows quick-add text
rules:
http://www.google.com/support/calendar/bin/answer.py?answer=36604#text
<http://www.google.com/support/calendar/bin/answer.py?answer=36604#text>Setting
reminders is done with the --reminder option.
Dates of events to retrieve from the server (for listing, deleting, etc.)
uses the --date option

In general, if you're having trouble with the usage, check the following
docs:
Manual: http://code.google.com/p/googlecl/wiki/Manual
<http://code.google.com/p/googlecl/wiki/Manual>FAQ / troubleshooting:
http://code.google.com/p/googlecl/wiki/FAQ
<http://code.google.com/p/googlecl/wiki/FAQ>Configuration file help:
http://code.google.com/p/googlecl/wiki/ConfigurationOptions

<http://code.google.com/p/googlecl/wiki/ConfigurationOptions>For example,
the manual has a section on Calendar, and at the end, a section on how to
use --date.

If anything is unclear or confusing, just let the mailing list know, and
we'll clear it up or fix the docs.

----------------


--
My Emacs Files At GitHub

org-googlecl release version - support tagging of blogged entries


GitHub : Tag blogged org entries with googlecl-blog-tag if its set. Auto delete suppport via googlecl-blog-auto-del.


--
My Emacs Files At GitHub

Ooo! Feedback on org-googlecl


Its always nice to get some feedback.





Subject: Re: org-googlecl : enhancements - replace existing blog entries.
From: Tim Burt <tcburt@rochester.rr DOT MOC>
Date: Wed, 15 Sep 2010 05:56:32 -0400

Richard Riley <rileyrg@gmail.com> writes:

> The org-googlecl package has been extended a little.
>
> http://splash-of-open-sauce.blogspot.com/2010/09/now-org-googlecl-supports-deleting-of_14.html
>
> It now detects if you try to blog an entry with the same title as an
> existing one and prompts you to view and/or remove one or more entries
> with the same name. Obviously very useful for just updating an entry (NB
> the url will change unfortunately). There is also a footer option and
> default labels (tags) if none are specified on the org entry you are
> blogging.

Tags as labels for the blog is a welcome feature.

> It's working pretty cleanly now but any feedback appreciated -
> its a pretty handy complement to org-mode if you maintain a
> blogger/blogspot account.

That's an understatement. Publishing from org to blogger is nearly
transparent and takes only seconds to confirm the information
(e.g. title, labels). It is a treat to use org-googlecl. Thank you
Richard.

Tim

> The elisp snippets you will see above were all
> blogged from my dotemacs files which are all in org files using this
> function.
>
> 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





--
My Emacs Files At GitHub

Saturday, September 11, 2010

Tagged org-googlecl as now includes interactive blog prompt


General function to prompt you if you really want to blog the org
entry if you are in an org buffer.





(defun googlecl-prompt-blog ()
"If in a org buffer prompt whether to blog the entire entry else normal text blog."
(interactive)
(if (eq major-mode 'org-mode)
(if (yes-or-no-p "Blog the Org Entry?")
(org-googlecl-blog)
(googlecl-blog))
(googlecl-blog)))






org-googlecl-blog at github