Wed 02 Aug 2006
| How I spent my lunch |
|---|
|
Well not too shabby. The html bloging still needs some editing as htmlize outputs full html pages. However it's not too bad. I just edd to cut some of the generated html out and change the body tag to a div and all is well This will, of course, probably be the last time I use this function. But it's still there when I need it!
(defun blog-buffer (&optional name)
"Blog the current buffer"
(interactive)
(let ((p (point-min)) (m (point-max)))
(kill-ring-save p m)
( if name
(write-blog name)
(write-blog
(substring (buffer-name) 0
(string-match "[.]" (buffer-name)))))
(yank))
)
(defun blog-region (name beg end)
"Blog the current region"
(interactive "sName: \nr")
(let ((p (point)) (m (mark)))
(kill-ring-save p m)
(write-blog name)
(yank))
)
(defun blog-buffer-html(name)
"htmlize the buffer then blog it"
(interactive "sName: ")
(setq htmlize-output-type "font")
(let ((buffer (htmlize-buffer)))
(set-buffer buffer)
(blog-buffer name)
(kill-buffer buffer))
(setq htmlize-output-type "css")
)
(defun blog-region-html(name beg end)
"htmlize the region then blog it"
(interactive "sName: \nr")
(setq htmlize-output-type "font")
(let ((buffer (htmlize-region beg end)))
(set-buffer buffer)
(blog-buffer name)
(kill-buffer buffer ))
(setq htmlize-output-type "css")
)
|
| comment (1) | Ari Turetzky | permanent link |
Hopefully it will be cooler tomorrow and not rain so you can go for a walk at lunch.