Richard Heck wrote: > This patch is now slightly updated. In place of the two scripts > tex4html_copy.py and dir_copy.py, there is now just one, ext_copy.py.
I was about to suggest that. > Without any optional arguments, this script acts like dir_copy.py did: > It copies all files in LyX's temporary directory to a subdirectory of > the target directory. But now the script takes two optional arguments: > -e: a list of extensions to copy, by default all > -t: an extension to add to the name of the generated target > directory, by default "LyXconv" Why -t? > The idea with the default in the latter case is simply to avoid > conflicting filenames. But if, like Uwe, you feel like being reckless > ;-), you can do define your HTML copier as: > python ext_copy.py -e html,css,png -t . $$i $$o > and you'll export to /path/to/filename.html/. Note the use of the dot > here. IMHO in the long term the usual ask-overwrite mechanism should kick in if a file with the same name as the directory already exists. Then no artificial suffix is needed. > This new patch will allow easy handling of other converters, such as > hevea (and if anyone knows what kinds of files it generates, let me > know, and I'll add the definition to configure.py). You just have to say > what kinds of files to copy. Of course, in some cases, you may end up > copying more than you really needed to copy, but avoiding this is > complicated and, to my mind, not entirely necessary, as this remains an > exceptional case. Why not assume a common set of extensions for all html converters? I guess they are all alike. > Index: lib/scripts/ext_copy.py > =================================================================== > --- lib/scripts/ext_copy.py (revision 0) > +++ lib/scripts/ext_copy.py (revision 0) > @@ -0,0 +1,86 @@ > +#! /usr/bin/env python > +# -*- coding: iso-8859-1 -*- > + > +# file tex_copy.py Copy/Paste. In general I would not have expected that you can solve this problem without touching the converter machinery. In the long term I think it should be made aware of directories nevertheless. Georg