"Kayvan A. Sylvan" <[EMAIL PROTECTED]> writes: | On Tue, Apr 02, 2002 at 08:42:48PM +0900, R. Lahaye wrote: >> >> Hi, >> >> Are there any cons for adding an input filter to the >> opening/saving of lyx files? >> >> Because most common users do not want to have a look at >> the contents of the lyx file itself, it could save a >> considerable amount of bytes by using (un)zipping during >> opening and saving the lyx document. >> >> Ideally a user configurable input/output filter could be >> used in the preferences (maybe somewhat similar to the >> graphics conversions in preferences). >> >> >> For example the gain with "gzip --best": >> >> filename (from CVS) :original:gzipped:percentage >> ---------------------------------------------------- >> splash.lyx : 2772 : 1216 : 44 % >> Foils.lyx : 9226 : 3177 : 34 % >> noweb2lyx.lyx : 22061 : 5730 : 26 % >> fr_ExemplesTableaux.lyx : 102153 : 3579 : 4 % >> ---------------------------------------------------- >> >> The last file is an odd example (the contents is very repetitive), >> but this list shows that gzipping can be useful and the larger >> the lyx file, the more efficient the zipping. >> >> Regards, >> Rob. > | I don't like this. This is a job best performed by an external script:
I do not quite agree. I think that LyX should be able to read a gzipped file and to write is back as zipped using zlib However to create the initial zipped file gzip proper should be used. | move /usr/bin/lyx to /usr/bin/lyx.real > | #!/bin/sh | # | # /usr/bin/lyx | # > | args="" | files="" | for arg | do | case $arg in | *.gz) | name=`echo $arg | sed 's@.gz$@@'` | gunzip $arg | if [ $? -ne 0 ] | then | echo "Error trying to gunzip $arg" | exit 1 | fi | files="${files} ${name}" | args="${args} ${name}" | ;; | *) | args="${args} ${arg}" | ;; | esac | done and can someone please explain to me the difference between ${arg} and $arg... -- Lgb