new idea: planner-pyblosxom

After playing with muse-blosxom.el, (emacs-wiki-)blosxom.el, remember-blosxom.el and pyblosxom, I found it’s pretty wired that I’m writting everything in my planner page, while I’d have to write something again for my blog. Also that means I’d have to keep a seperate set of data, and it’s not an easy work to keep them synced.

The ideal thing to me will be, I write things down casualy, without too much interrupt, with the remember package and keep working. While some time later, maybe just after I wrote down the note, I decide wether I want to publish it on my blog. And it’s nature that the blog category and the planner plan page got some match.

So here is my plan to intergrate planner notes and pyblosxom together. I choose pyblosxom just because I don’t want to bother learning Perl and it has all the features I want.

I can use `remember-planner-append-hook’ to call a function asking wether I want the current note should be published to my blog. And I can call a function like planner-add-note-to-blog to add the current note I’m looking at to the blog.

For a note that need to be add to blog, I need to find some way to mark it, together with some pyblosxom needed infos. For a pyblosxom entry (a story), these infos are critical: The category, the file, the data created, the title, the meta info, the body, and the comments.

I can have an alist to map the plan page to a category, plan pages not in the alist will be in their own category, notes without an associated plan page will be asked for category, and for sure I can change the category if I want.

Pyblosxom use the mtime of file to define the story created date, this is not ideal and there already been some solutions. The HardCodeDates plugin looks fit me best. It uses a plain text file and only read from it, also it uses relative pathname to find the story file. Michael have a version too in the muse contrib directory. This one looks better cause it supports timestamp with only date. So I can extract the note create time if it’s available, and add it together with the date (we are on day pages) to this file. Later update syncs could use this file to determin if the current is published or not.

The file name could be YYYY-MM-DD-Notenumber. Pyblosxom doesn’t care about file names so it’s OK as long as it’s unique.

And it’s nature the note title becomes the blog entry title.

The meta info is totally a pyblosxom thing and I should save it together with the category info.

The body of the blog entry is rendered from the note body by emacs-wiki. This is the best part I like. I can have all the planner-annotations published. However dates like

2005.03.27

and

PlanPageNames

should be handeled differently. They have a good target on the blog though :) This also leaves room for moving to muse one day: it doesn’t know about planner-annotations for now. And after planner is ported to muse, planner-pyblosxom should be OK to work with muse too. One tech problem is that I haven’t found an emacs-wiki-publish-* things that can render a region. Might need a temporary buffer or something.

There are several pyblosxom plugins dealing with adding comments and looks comments is the de-facro one. It store comments in a directory, The comments themselves are stored as XML files named entryname-datetime.suffix. So I can know if there’s a comment for a specific note by checking the file names in the comment dir. However to read it into Emacs I need an XML parser. I can either use the API comes with the comments plugin via pymacs or use xml-parser.el. Also I need to think about what to do with these data. It looks good to have them back in the planner note, but will this polute the day page? Also adding a comment from with Emacs is possiable: Just write it, format it into XML, and put in a file with the right name.

Another good thing is to have links from the published plan page to the blog entry, so people visiting my plan pages can easily add a comment via the blog interface.

Tags: , ,

Post a Comment

You could use <code type="name"> to get your code colorized

Your email is never published nor shared. Required fields are marked *

Close
E-mail It