|
From: Gilles D. <gr...@sc...> - 2002-11-22 21:16:05
|
According to Carl Holtje: > Hoping this is a good place to post this... > > As a configuration option, available to pages like the footer or header, I'd > like to be able to put the modification date of one of the database files... > > I'm not completely convinced the full time is necessary, but at the very least > the date would be most helpful.. > > This would allow a user to know exactly how old the database is and therefore > how current the results are... This is pretty easy to do with an htsearch wrapper script. Note that any environment variable can be referenced from an htsearch template file. See http://www.htdig.org/FAQ.html#q4.7 and http://www.htdig.org/FAQ.html#q4.11 The wrapper script might look something like... #!/bin/sh DBDATE=`ls -l --full-time /var/lib/htdig/db/db.docdb | sed 's/^[^ ]* *[^ ]* *[^ ]* *[^ ]* *[^ ]* *\([^.]*\)[.0-9 -]* *[^ ]*$/\1/'` export DBDATE /path/to/real/htsearch ${@+"$@"} Then you'd use $(DBDATE) wherever you want in your template files. -- Gilles R. Detillieux E-mail: <gr...@sc...> Spinal Cord Research Centre WWW: http://www.scrc.umanitoba.ca/ Dept. Physiology, U. of Manitoba Winnipeg, MB R3E 3J7 (Canada) |