Filtering based on dates

It seems a few people liked yesterday's simple script. Now, lets add the ability to filter based on date, as specified in the path in the URL. This involves, as you might expect, parsing the PATH_INFO and filtering the files based on this information. It also changes the number of elements that can be displayed on the page. Here's today's version.


For one of us non-technical oddballs looking at this, that can only read Python by comparing statements to languages I do know, could you explain where the data is?

Posted by David at

The data is in files in the current working directory. The format is the same as the one that blosxom uses, with one addition. Comments are also stored in the same directory as files of the same format but with names that are formed by concatenating a "-" and a unique identifier to the base name and with an extension of ".cmt".

Posted by Sam Ruby at


you mean this sort of functionality isn't general? it was one of the first things i put into my code; see http://ken.coar.org/blog/docco.html#urlparams -- or am i missing something (again)?

Posted by Rodent of Unsual Size at

Ken, the functionallity is general. I'm simply rewriting my blogging software from scratch, and this blog entry corresponded to the point at which I added support for dates into my new software.

It is a lengthy discussion, but I have put great thoughts into my usage of URLs, and I am trying to avoid the use of urlparams as much as possible. This will be important as I enable caching on the server.

Posted by Sam Ruby at


Lazy Caching

After seeing Sam's comment on caching , I decided to give it a try. I am not deploying this code for the following reasons: The index file for a directory must be generated at the same time that the directory is created. Although this is not...

Excerpt from gary burd at

Lazy Caching

After seeing Sam's comment on caching , I decided to give it a try. I am not deploying this code for the following reasons: The index file for a directory must be generated at the same time that the directory is created. Although this is not...

Excerpt from gary burd at

Add your comment












Nav Bar