|
From: chombee <ch...@la...> - 2010-02-20 22:42:19
|
On Sat, Feb 20, 2010 at 04:53:01PM -0500, will kahn-greene wrote: > On 02/20/2010 04:03 PM, chombee wrote: > > Maybe a suggestion for 2.0? Or, this could perhaps be implemented as a > > plugin first as a test and then maybe integrated into 2.0 later. > > > > Pyblosxom's entry metadata is a neat feature but in my humble opinion > > the syntax is a little ugly and non-standard. Here's an example of what > > I'm talking about: > > > > This is my first post > > #mood bored > > #music The Doors - Greatest Hits Vol 1 > > > > This is the beginning of the body of my post... > > > > The most standard, recognisable use of words beginning with a # like > > that is as tags in twitter, identica etc., not as key: value pairs. > > PyBlosxom and Blosxom both predate Twitter and Identi.ca. I don't think > that this is adequate argument that the metadata syntax is non-standard. What, you mean that I think it looks nicer isn't enough? :) But seriously, I don't think that pyblosxom predates twitter and identica (and possibly YAML also) is any reason not to modernise. Forget that #mood looks to me like a hash-tag. The more important point is that '#mood bored' does _not_ look to me like a key, value pair. A more common syntax for key, value pairs, as used in email headers, YAML, JSON, Python, Ruby and others, is 'mood: bored'. This syntax has become popular for good reason: it's very readable, it's close to a common construction used in natural English, it's simple and unambiguous to parse, etc. Maybe it's just me, but the # syntax just seems a little arbitrary. > > It's also very limited. Metadata keys cannot contain spaces, and > > metadata values can only be one line long. I'd suggest an > > alternative syntax: [snip] > > What are the compelling use cases for spaces in metadata keys and > metadata values that are longer than a line? Have there been things > you haven't been able to do with the existing format? Spaces in keys is a small thing, but it would be nice. As for multiple lines, I think there are lots of things that I might want to put in metadata that might use it. For example, say I want to put a summary of each post in its metadata and I'll write my flavours such that the summaries and not the full contents are used in the RSS feed, and on the index pages. So I add a #summary tag. But my summary is limited to one line, I can't hard-wrap it in my editor and I can't use multiple paragraphs in my summary. I'm sure there are other things you might want to do, basically whenever you want a post to have something that's more than one line that isn't the body of the post. My tumblelog plugin ran into this problem also, which is why I had to write a new entry parser for it. If I have time I may do some plugin hacking soon and see what comes off it. |