Michael Foord wrote:
>
>
> -------- Original Message --------
> Subject: file removal
> Date: Thu, 3 Aug 2006 11:04:47 +0100
> From: martin f krafft <ma...@ma...>
> To: Michael Foord <fuz...@vo...>
>
>
> If I remove foo.txt, I guess it's by design that foo.html is *not*
> deleted? It makes sense, but could we have an option to turn on
> automatic html file deletion?
Well... rest2web doesn't (yet) cache its output. It has no knowledge of
how files that exist in the output directory got there.
In fact I use rest2web to generate only part of my website. I definitely
*wouldn't* want it deleting all files in the output directory that it
didn't put there.
I guess it could make a list of all the files in directories it outputs
to, and remove from the list any that it puts there. When it has
completed its run it could delete any still left in the list. Would that
do, or can you think of a better approach ?
This won't play well with the gallery plugin of course. The difficulty
is that rest2web can copy files into the output directory, using the
'file' command in the restindex. If you deleted a source file, would you
expect rest2web to delete files that are there because it copied them
across last time ? If you wouldn't expect it to delete them, maybe I can
restrict files be deleted to 'html' and 'shtml' files (unless you use
rest2web to generate XML/RSS as well...)
All the best,
Fuzzyman
http://www.voidspace.org.uk/python/index.shtml
|