[Moin-devel] SeaPig WebLog features and timestamp readability in edit mode
Steve Howell
showell at zipcon.com
Sun Jan 13 09:23:03 EST 2002
Brian Dorsey and I did some pairing the other night on MoinMoin. We
were brainstorming on all sorts of ideas, and we spontaneously started
writing a BlogEdit action.
We want to contribute BlogEdit to MoinMoin, but it probably duplicates
or parallels current work on WebLogs.
BlogEdit is an extremely minimalist action. It basically wraps the
EditText functionality, and it prepends a date tag, and a little comment
marker that delimits the blog entry. You can see the code here, and you
might also want to go to our blog sandbox to try it out:
http://www.zipcon.net/~showell/cgi-bin/MoinMoin/moin.py/BlogEdit
This page resides on the Seattle Python Interest Group (SeaPig) wiki.
Our next feature will be to show all recent blog entries for the entire
Wiki (or all blog entries among a subset of Wiki pages matching a
regex). This feature would rely on all blog entries having a consistent
marker. For example, here is what SandBoxBlog looks like now when you
go to edit it:
==================================
##BEGIN BLOG
'''2002-01-13 09:05'''
So I was typing in the sandbox one day, and I couldn't really think of
anything witty or amusing to say. Oh well.
##------------------------------------
Try blogging here.
===================================
The feature to show all recent blog entries would probably be a macro.
We might show the last 10 entries.
You can see that the date for SeaPig's SandBoxBlog entry is just an
ordinary string. This works fine for our Wiki, since we're all on
Seattle time, but we want to do internationalization. In fact, Brian
and I implemented BlogEdit with the new @TIME@ feature on his machine,
but I had to back it out on SeaPig, because I don't have the latest
version. Even with the @TIME@ feature, though, I am not completely
satisfied. I don't like how @TIME@ replaces itself with
seconds-since-whenever. When you go to edit a page, you can't really
determine the dates of prior entries. Brian and I are considering a
variation like this:
[[Time('2002-01-13 09:15', '%Y-%m-%D %H:%M', -9)]]
This marker says that the @TIME@ macro was expanded at 2002-01-13 09:15
local time when some one edited the page from a time zone that was 9
hours behind Greenwhich Mean Time. When MoinMoin goes to expand the
macro for, say, somebody, in Germany, it would have to do two steps.
First, it would convert the American time back to GMT. Second, it would
recalculate/reformat the time for the German user.
I understand that this complicates things a bit, but it makes it easier
for folks to go back and clean up their web logs. For example, people
might decide to archive after every month, and it would be helpful in
edit mode to see the timestamps.
More information about the Moin-devel
mailing list