Robert D Feinman

Photoshop Web Photo Gallery Fix

The Photoshop Web Photo Gallery feature has a problem when IPTC Caption data is used for the Large Image "Description". This data will show as a caption under the image when the appropriate options are chosen. Adding HTML markup such as line breaks, <br>, or paragraphs <p>...</p> to the IPTC is an obvious idea since it will be displayed on a Web page.

Some Web Photo Gallery software, e.g. Photo Thumbs and others, will accept and properly display such HTML page breaks. Unfortunately, after creating a Photoshop Web Photo Gallery with HTML markup the large image caption does not display the code properly but, instead, the start and end brackets are translated into less than and greater than symbols.

The following AWK script has been written to convert these strings back to the correct html markup. Using the syntax below run it in Pages sub-directory on all the htm or html files that were generated by the Gallery feature.

In a command window:
> awk -f chg_tlgl.awk *.htm

A compiled version, chg_ltgt.exe is also provided for those who do not possess an AWK interpreter. In a command window:
> chg_ltgt.exe *.htm

It is recommended that you back up your *.htm files before executing the script. If you have any comments you can contact the script author directly:
Charles M. Goldstein

For those who may want to examine the script here is what the code contains:

BEGIN { FS = "\t"
       for(i=1; i < ARGC; i++) 
         while ( getline < fnm >0)
           n=gsub(/\&lt;/, "<")
           n=gsub(/\&gt;/, ">")
           print > "tmp"
          system("rm " fnm )
          system("mv  tmp  "    fnm)
          print  fnm

Don't copy the code from this page since it has been formatted for display. Use one of the links below instead.

Right Click here and do a "save as" to download the script.

Right Click here and do a "save as" to download the compiled version.

Back to Tips

Take some time to enjoy the rest of the site

Send email to robert.feinman@gmail.com

© 2004 Robert D Feinman