v1.25 - http://www.bewley.net/perl/gif2html.pl
Example: gif2html.pl -v -t template.html *.gif *.jpg
Sample Output: http://www.bewley.net/vacation/sf-alcatraz1.jpg.html
Use gif2html.pl in batch jobs. It takes a butt load of graphics and creates
an html file for each one, giving you complete control over the html. Simply
create an html
Template with an empty <img src=> in it. Gif2html.pl will
copy the template for each image and fill in each <img src=> with the
appropriate URL and width/height tags. It will also include unique
for each image.
Tested with UNIX of course and also Win95 Perl5.001m b107
Give your graphics descriptive names. Use full words seperated by a '-'. Dashes will be converted to spaces and possibly placed in the title depending on your template. Better yet, use the captions.
This template will be copied for each image to a file having the same name as
the image but ending in .html. Also see the default template in sub
Notice the empty <IMG SRC=``''> tag. This will automagically be filled in with the URL of the graphic along with its width and height tags.
Also notice the <S-INSERT TITLE> and <S-INSERT CAPTION>. If you do not insert a title then the name of the graphic file will become the default title of the HTML file although dashes and underscores will be converted to spaces. The <S-INSERT CAPTION> will be filled in with the corresponding caption for the image.
It is possible to create a custom caption for each image. Simply create a file that looks like so:
The first word must be a graphics filename followed by a | with optional spaces
around it. The caption continues until a blank line and will be stuffed
in place of the <S-INSERT CAPTION> tag in the
Captions may span lines and must be seperated by a BLANK line. If you need a
blank line in your caption for some reason (maybe you are useing
<PRE>) then you need to put a space on the blank line.
If a graphic does not have a caption then gif2html.pl will put the graphics name in as a caption, just as in the title.
Tell gif2html.pl where to find this file by either specifying it on the command line with the -c option or putting its name in the $CAPTION_FILE user variable.
Old versions still hanging around: http://www.bewley.net/perl/gif2html.pl-0.9 http://www.bewley.net/perl/gif2html.pl-1.1
Dale has recently started a business, Bewley Internet Solutions http://www.bewley.net/ if you like this script why not send him a job, a check, or maybe just a book?