WWWis‎ > ‎

Running WWWis

WWWis is easy to run. It does not recurse down directories, but you can make it do that easily with a simple find command (given below)

You don't need to be in the directory the file is in for it to work with relative paths either wwwis pub/html/file.html will work fine

Run wwwis FILENAME to convert FILENAME to support WIDTH and HEIGHT tags. The program will rename the original to FILENAME~ (or whatever you suggested as a backup extension) and the converted file will be named FILENAME

You may also want to specify some of the options on the Command Line

If you have problems running it...

The WWWis script has some clever stuff at the start to try and run perl for you wherever it is installed - if this does not work then change the first few lines to be '#!/usr/local/bin/perl -w' or wherever you have perl installed. If you're running on a Windows platform there's no nice way to run the script so you'll have to just run it with a 'perl wwwis FILENAME'.

On some platforms you may get "Exec format error" when find tries to run wwwis - you can fix this by changing the way perl is run from eval 'exec perl -w -S $0 ${1+"$@"}' to the more traditional #!/usr/local/bin/perl5 -w
(Thanks to Mikko Kurki-Suonio for this note).

Apparently the latest tcsh also doesn't like the fancy exec stuff and exits with a "Missing }" just follow the steps above to fix it (Thanks to Dan Heller for this tip).

More impressive scripts

Run it on all the HTML files below the current directory
find . -name '*.html' -print | xargs wwwis 
or find . -name '*.html' -exec wwwis {} \; ;
Run it on all the HTML files which have been changed in the last 7 days
find . -name '*.html' -ctime +7 -exec wwwis {} \; ;
Remove all the backup files (Be Careful!)
find . -name '*.html~' -print | perl -ne 'chop;unlink'
or find . -name '*.html~' -exec rm -f {} \; ;

To find .shtml files and .html files replace '*.html' with '*.*html'