WWWis‎ > ‎

WWWis Options

Option Description
SearchURLS Set to Yes to enable connecting to other servers to grab gifs referenced as http://foo.com/1.gif
DocumentRoot Set this to where the start of your site's HTML documents start. A typical example would be /home/www/htdocs
userDir If your users have their personal HTML in their own home directories then this is the directory under their home directory that they store their HTML. Typical values include pub/html or public_html
MakeBackup Unimplemented at present: this option will allow you to specify if you don't want to create a backup file. It is to be used with EXTREMEcaution.
BackupExtension This is what a backup file will have appended to it e.g. normally the backup of FILE will be FILE~ but you might want to use .bak (or anything else).
OverwriteBackup Normally if WWWimagesize comes across a backup file of the file you are checking it will stop. Change this variable to YES to automagically overwrite the backup file or set it to ASK to prompt you each time.
ChangeIfThere This variable determines what to do if the WIDTH & HEIGHT tags are already present. There are four options.
  • YES - Whatever happens the new tags will be put in.
  • NO - If there were tags there then they will be left unchanged, otherwise the new tags will be added.
  • ASK - If there were tags there the user will be prompted if they want to change to the newly calculated tags.
  • CLEVER - If there were tags there and the tags are not an integer multiple of the newly calculated tags then the user is prompted if they want to change the tags. This is really useful for Netscape users, who resize images at the browser end by giving a width & height that is not that of the image.
Skip1x1 This is similar to ChangeIfThere - if you have images 1 pixel by 1 pixel and then scale them using the width & height tags, this will skip those images.
SkipThreshold If Skip1x1 doesn't do it for you and you have images below a certain size that you want skipped, set the size here, a vlue of 0 disables this option, a value of 3 will skip all images smaller than 3x3 e.g. 3x3, 3x2 1x1 but not 4x2.
DoChmodChown A new option to allow you to try and keep the permissions & ownerships the same on the files. This may not work on all systems so if you are having problems please set to NO. (I have only heard of it not working once so far though!).
UpcaseTags This is an unsupported Gimmiky new feature that only works well on well written HTML. What it does is changes the case of each HTML tag to be either upper or lower case. Note if you do not quote your attribute values (i.e. NAME="hello") then it will change their case. Everything in quotes is not modified, but I don't check for \". It is included as an experiment and I more than willing to accept code updates. Possible values are Yes, No, Upper & Lower.
UpcaseNewTags Set this to true if you want inserted tags to be WIDTH= and HEIGHT= otherwise width= and height= will be used. Possible values are Yes & No.
TryServer If WWWis cannot find a file referenced from a document on the local file system it can contact the server and ask it for the file. This gets around the problems with some servers having translation tables. You must have the Base option specified to use this
QuoteNums When WWWis inserts the width and height you can give it the option to quote the values it inserts (i.e. WIDTH="10" instead of WIDTH=10). Possible values are Yes, No, Single & Double. The default if Yes is set is double quotes.
Munge% If set to Yes WWWis will replace Width & Height values which use the % sign with the real width & height.
NeedAlt If set to Yes WWWis will complain for each image which does not have an ALT tag. Future extensions may include it asking you for a value.
SkipCGI If set to yes, WWWis will ignore links which look like the output of CGI programs (which may vary on each execution).
UseNewGifsize Since version 2.2 a new routine has been provided which finds the actual size of the 1st GIF image in a GIF file. The old version used to find the screen size which was (almost) always the same as the image size. You can set this to either use the new one or the old one. The old one will be much faster.
UseHash No I am not condoning drug use :-)
If this option is set to yes - for each execution of WWWis remembers the previous Files and URLs it has loaded and calculated the image size for and stores them in a hash table. If you reference that file again it is not loaded, the hashed value is simply used again.
Base Set this option to the base of where you are running WWWis from. If WWWis cannot find a file and TryServer is true then it will try and contact the server to get the file. This is usually a URL.
Infilter This is a script which will be run on the named file and WWWis will parse the output of that file.
OutFilter This is a script which the output of WWWis will be piped to. It will be given the argument of the file which is to be saved.
SaveTimestamp When turned on, the new file will have the same timestamps as the original file. This is good for some blogging software that sorts entries based on the timestamps of the files.
Script This is similar to OutFilter, however the file is written and then the script is called on that file.
Proxy If you want to use a proxy server for your HTML requests then specify it here. You specify it by giving it like a URL, e.g. http://www.proxy.com:8080/
IgnoreLinks This is on by default. Files which are Symbolic links will not be processed
UsePerlCp When WWWis creates a copy of a file - for the backup, you now have the option to use Perl's Copy command (From File::Copy) or you can use the system's cp command via a system call. The system call is slower, but you have more control over it.
Quiet Run in quiet mode. Nothing is printed to the screen.