Pages

Showing posts with label blogger. Show all posts
Showing posts with label blogger. Show all posts

Wednesday, March 9, 2011

org-googlecl - blogging to blogger.com through org-mode


Installing a new Asus 1015PEM netbook with Debian Squeeze recently I had to
reinstall the google command line utility, googlecl. My utility org-googlecl to
allow me to blog directly from org-mode entries was broken however.



Google command line utility



Reason? googlecl , somewhat surprisingly, does not automatically create its
~/.local/share/googlecl/ directory. Simply create it yourself and then
org-googlecl works as documented.



Blog directly to blogger.com from Emacs (org-mode support)



As a side note, using the Liquorix kernel, the Asus works perfectly with
Debian : all the "usual suspects" work - suspend/resume, wireless and audio all
work. Initially post-resume I had to manually remove and re-modprobe the
brcm80211 driver but that now seems to be resolved. On the downside, battery
life is rubbish compared to running Win 7 Start Edition which it came with (dual
boot) but its still acceptable - but when you think I have this litle beauty
running apache2 and mysql it's still a great little portable machine.






--
My Emacs Files At GitHub

Saturday, September 18, 2010

Altering the style of source code snippets at blogspot

When editing your blog go to "design" and then edit your template. Add
the following to the end of CSS section.




pre.src {border: 1px solid rgb(187, 187, 187);
margin: 15px 5px;
padding: 5px;
background: rgb(238}\, 238, 238) none repeat scroll 0% 0%;
overflow: auto;
font-size: 130%;
-moz-background-clip: border;
-moz-background-origin: padding;
-moz-background-inline-policy: continuous;
}




Also see http://emacs-fu.blogspot.com/2010/05/using-zenburn-for-org-mode-generated.html


--
My Emacs Files At GitHub

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

Tuesday, January 13, 2009

Posting Source Code

I am having trouble with source code posting to blogger. This surprises me since I would have though this had been well covered at this stage in Blogger's life.

I tried this page but that doesnt support s-lisp, and, didn't work for other code either.

The settings in Blogger has something which allows conversion of hard returns to html breaks but that doesn't seem to work when blogging using the emacs client e-blog.

Any suggestions or comments?