[Tutor] need help planning website updates
Jay Loden
python at jayloden.com
Thu Jan 20 18:25:08 CET 2005
I have a sort of simple CMS system on my website made from a conglomeration of
scripts. On the left column, I want to add a feature that shows the last
five items updated (only html & exe files in the /var/www/html/ for example)
directory that I have updated, with each item as a link to the page. You can
see what this is supposed to look like at http://jayloden.com (right now it's
being done by hand)
I've been thinking of having a crontab run a Python script, which logs checks
a file with something along the lines of:
file.foo = 12:20-1/20/05
for each file, containing the date and time the file was last modified. Then
I would have the crontab script check the date in the file versus the dates
on the current files, and if the current files have been updated, to add them
to the html on the side of the page. I have no trouble setting up the
crontab, or editing the html template for my page (it's all created from php
on the fly) but I wanted to know if I am going about this a semi-intelligent
and/or efficient way, or if there is some incredibly better way that I could
do this with Python. For example, is there some other way to notify my
script that a file has been modified, rather than run a crontab a couple
times an hour. Is there maybe a better way to store and check dates, etc.
Thanks!
-Jay
More information about the Tutor
mailing list