Markdown and the hCal microformat

Michael McCracken mike at cs.ucsd.edu
Thu Aug 3 13:55:29 EDT 2006


Hi, I've got a suggestion for adding something to Markdown's syntax.
I'm new to the list, so I don't know if this is likely to be received
well - I'm aware that it's not all that common (yet) to want to do
something like this, and I don't know where everyone here stands on
if or how to make markup more meaningful.

I'd like to generate some microformated XHTML using Markdown.
Specifically, I've wanted to mark up events using [hCal][1] in my
weblog posts, but using Markdown for so long has made me loathe to
write XHTML directly.

I've come up with one possible syntax based loosely on event
descriptions I've seen in emails and modified Markdown to support it
partially*, but I wanted to ping the list for suggestions on
improvements. It's inspired by emailed events and agendas like this one:


> Thursday, June 22

> 08:30-09:00 Welcome/Intro

> 09:00-09:30 Productivity Team Highlights and Meeting Goals

> 09:30-10:45 Demos of Execution Time Analysis Tools

> 10:45-11:00 Break

> 11:00-12:15 Demos of Development Time Experiment Tools


and this one:


> Just a reminder, we're meeting in room 309 today at 3pm to discuss

> the AEGIS paper.


Here's the idea - there's a lot of information you *could* put into
an hcalendar item, but the most common in emails I've gotten is date/
description/location, so I tried to find a simple way to support that:

(startdate-optional enddate)[description/title @ location]

for example:

(23rd June 2002)[Big Meeting @ Room 200, Bldg 3]
(10am-2pm)[World Cup game]

becomes:

<div class="vcalendar"><span class="vevent">
<span class="summary">Big Meeting </span>
<abbr class="dtstart" title="23rd June 2002">23rd June 2002</
abbr></span>
<span class="location">Room 200, Bldg 3</span>
</div>

<div class="vcalendar"><span class="vevent">
<span class="summary">World Cup game</span>
<abbr class="dtstart" title="10am">10am</abbr></span>
- <abbr class="dtend" title="2pm">2pm</abbr></span>
</div>

(Note the date titles should be ISO standard dates*).

I'm interested in hearing feedback about whether or not this is a
direction Markdown should go, as well as suggestions for improving
the syntax, which I think could be improved. (especially since it
looks a lot like inline link syntax).

Another thing that might be worth considering is the possibility of a
way to mark up more microformats in a reasonable way. Events are one
important case, but so are people, and maybe a more extensible way to
do it is worth thinking about?

Thanks,
-mike

* - Date handling needs to be improved, to build a real ISO date from
human readable ones in a reasonable way, but I'm not a Perl wizard
and I didn't have net connectivity when I wrote this, so I'm not sure
how to proceed there. Is there a module to do something like that?

[1]:http://microformats.org/wiki/hcalendar


More information about the Markdown-Discuss mailing list