(home | about | stats)

More redesign thoughts

URLs

All working URLs are of the form

/templatename/tag1/tag2/tag3

These may be rooted somewhere else, for example http://www.kryogenix.org/days/templatename/tag1

Templates are the following:

Posts on a page are those which match all specified tags.

URLs without a template name at the beginning should be resolved in the following way, for a URL /foo/bar:

Some parsing magic needs to happen on the URL, so that a URL which contains /YYYY/MM/DD has that treated as *one* tag, as well as three separate ones. Equally, /YYYY/MM gets treated as one tag as well as two. This means that a post posted on 30/01/1976 gets tags "1976/01/30", "1976/01", "30", "01", "1976".

Architecture

Posts are stored in text files. Post metadata is stored in a database. All queries happen against the database. Only open the files if you have to. Adding or editing a file updates the database.

Use WSGI to get the data. That way it can be hooked to CGI or mod_python or whatever once it's done (but can be tested with CGI).

Posting

When you send a post, it should have embedded metadata. In pictures that'll be EXIF or whatever. In posts it'll be in rfc822 headers at the top or similar. The posting process must extract that data and store it in the DB, but leave it intact in the on-disc file. The display process must suppress it.

How do you send metadata when it can't go in-band? (i.e., with an image where you want to explicitly specify your own metadata in addition to the exif stuff?)

www.kryogenix.org owner. This is a pwyky site. Edit this document.