What's It Going to be then, Eh?
Thu 03 Aug 2006
29 Ways
Weight: 201
Workout: None

Slept in today. I have Owen's cold to thank for the weight loss lately. I'll take it though. Today is sushi day so with the salt from that I will prolly be 203 tomorrow.

I went to Wal-Mart this morning and got a windsheild screen thing to see if that helps keep the car a little cooler during the day. Also got some yummy Dunkin' Donuts coffee. And some donuts cause it makes the cofee cheaper!

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")
)

blog

Ok looks like it might take some work as the ouput still needs editing. However that should just be a bit of regex magic. So far this seems to work though in a basic not w3c kind of way.

(defun blog-region-html(beg end)
  "htmlize the region then blog it"
  (interactive "r")
  (setq htmlize-output-type "font")
  (set-buffer (htmlize-region beg end))
  (blog-buffer)
  (setq htmlize-output-type "css")
  (kill-buffer)
)

Blogging Buffers and regions

Well, here I was thinking I'd have a nice project for lunch. I want to be able to blog a region or a buffer in emacs as well. No real reason but it seemed like a nice thing to add. Sadly it took me all of 10 minutes. I really thought it would be harder.

I should have known that emacs would make this task easier. As it does all things

I guess I can start on getting it to htmlize the buffers and regions before blogging them. Maybe that will take up the rest of lunch.

The more I work in lisp for this the more I like the language. If it wasn't for all the damn parentheses!

Testing Custom Values

I have added some customization for the blog so that if anyone else uses bloxsom they could also use this mode and set where the files are saved as well as what file extension they use for blosxom entries

Just a series of functions

After some reading last night I have figured out a way to do the auto-blogging thing without using a major mode. I'm not sure if that is something I really want to do though. I think I like the idea of having a blog mode for doing some editing and blogging. It will be a nice place to add some functionality

Good Year For The Roses
Weight: 205
Workout: 20 Minute Walk

Nyquil did its job and I slept like a stone. I got some Dayquil when I picked up coffee just to make sure though

Today is a big test for Bean and Owen. They will be spending all day with a sitter. I know they will do great.

Tue 01 Aug 2006
F12

I have designated f12 to be the key for creating a blog

Major Mode fun

Well, I have now created a major mode for emacs. I'm not sure that was the correct way to do it. I think this should really be a minor mode but this was the only way I could get it to work. I am typing this in "blog-mode" buffer. I came to this buffer after typing M-x write-blog(I'll bind that to a key in a second) The buffers name is *Major Mode fun* and when I hit C-c C-c it will be saved via ssh to my server and become a blog entry as timestamp.txt. Pretty durn neat. Now I just need to update it a bit to add some other commands.

BlogMacs
I am playing with writing a blogging mode for emacs. I'm not sure that it will increase my blogging but it will make it easier. Now all I have to do is M-x write-blog and off I go!
« older | newer »

Home
Weight graph, 793 weigh-ins