dates in filenames?
Russell Nelson <[email protected]>
| Newsgroups | gmane.comp.web.pyblosxom.user |
|---|---|
| Message-ID | <[email protected]> |
I see that various solutions to the problem of unix timestamps have been proposed. I wrote my own blogging software in Python, and have recently switched to pyblosxom. Here's what I did in my software: When my software saw a "new" file, e.g. File.txt, it would make a link to that file. The link has the same name as the file, but with -mtime appended, e.g. File-1096229979.txt. If that file already existed, then of course it wasn't a "new" file. Then, if somebody edited the file for any reason, it would have a new mtime because a new file would be created. However, the original -mtime file is still there, and its mtime is used instead of the new mtime. This may seem sub-optimal because it means that the original copy of every edited file is still sitting around. I consider that a benefit, though, because whenever an edited file is found, I modify it to insert a "Previously Published on" with a link to the previous version. That way, somebody can see what I've changed. So, if that wasn't desirable, then you could create an empty File.stamp whenever you see a File.txt without a File.stamp. Give it the same mtime as File.txt and use that mtime for File.txt from then on. I'm just looking for suggestions and/or wisdom, not asking anybody to do my programming for me. -- --My blog is at angry-economist.russnelson.com | Violence never solves Crynwr sells support for free software | PGPok | problems, it just changes 521 Pleasant Valley Rd. | +1 212-202-2318 voice | them into more subtle Potsdam, NY 13676-3213 | FWD# 404529 via VOIP | problems. ------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php