Name:
icat - HTML Image Cataloging perl script by Phil HarveyDescription:
Tool for building hierarchical HTML catalogs of JPG and GIF imagesSynopsis:
icat [OPTION] DIRCommand-line Arguments:
-_ (--flat_dir) use flat directory structure for thumbnail images -% (--show_progress) print progress in % -a (--auto_rotate) enable auto-rotation for next download directory -b TAG (--body_tag) use specified html body tag (both frames) -c (--show_comments) show image file comments -d IN OUT (--download) input/output dirs for downloading pictures (note 4) -e (--no_exact_size) do not force small image to exact size -f (--force_overwrite)force icat to overwrite unrecognized html files -g (--ignore_state) ignore state file (icat.state) if it exists -h (--help) show this help -i TAG (--image_body_tag) use specified html body tag (image frame only) -j (--jpg_from_raw) extract JPG from RAW file if JPG doesn't exist -k (--clean_raw) remove JPG from RAW after extracting it -l (--local) create local.html files for local browsing -m (--rebuild_medium) regenerate medium images, even if they already exist -n (--no_recursion) no recursion into subdirectories -o DIR (--omit) omit cataloging directories with specified name -p URL (--parent_url) specify parent URL for root image directory -q (--no_square) disable square thumbnail images -r (--remove_exif) remove EXIF information from generated JPG images -s (--rebuild_small) regenerate small images, even if they already exist -t (--trash) use specified directory for 'rmpic' trash -v (--verbose) enable verbose mode -x (--show_extension) show file extensions in image label -w (--write_state) write state file to speed rebuilding of large catalogs -y FMT (--date_format) specify format for EXIF dates (see strftime manpage) -z (--strict_sort) do not sort thumbnails by size. Retain strict order -A W C (--frame) frame picture with specified width (W) and html color (C) -B TEXT (--back_text) use specified html text for Back link -D TEXT (--dummy_text) html text for dummy link (where no Prev or Next exists) -E TAG (--exif) display specified exif tag information -F TEXT (--footer) html text for page footer -H TEXT (--dir_header) html text for header of page with no images -I TEXT (--image_header) html text for header of page with with images -J JAVA (--javascript) additional java script for document head ["$java"] -L NPIX (--small_long) long dimension of small thumbnail image [$small_long] -M NPIX (--medium_size) maximum dimension of medium image [$med_width] -N TEXT (--next_text) use specified html text for Next link -O STR (--only) process only directory names containing specified string -P TEXT (--prev_text) use specified html text for Prev link -R EXT (--raw) extension for camera raw files [] -S NPIX (--small_short) short dimension of small thumbnail image [$small_short] -T TEXT (--title) title for image catalog ["$title"] -V (--save_preview) save preview image in 'preview' directory for downloads -W NPIX (--frame_width) width of thumbnail frame [$frame_width] -1 FILE (--wav_file) image for WAV file thumbnail -2 FILE (--mov_file) image for MOV and AVI file thumbnail (--tags_from_raw) copy all tags from raw image to extracted jpgDefaults:
-b "<body bgcolor='#663333' text='#ffffff' link='#ffff00' vlink='#77ff77' alink='#77ff77'>" -i "<body bgcolor='#006633' text='#ffffff' link='#ffff00' vlink='#77ff77' alink='#77ff77'>" -B "><b><<-Back</b>" -P "><b><--Prev</b>" -N "><b>Next--></b>" -D "" -H "<font size='+1'>No Images in this directory</font><p>(Current dir is images/_SUBDIR_)" -I "Click on any small image to enlarge" -F ""
icat --frame 2 #000000 --frame 8 #ffffff
_SUBDIR_ - gives the current sub-directory name _DATE_ - date of last changed image file or subdirectory
_RELDIR_ - the location of the base directory relative to each subdirectory
ie)
Hierarchical thumbnail directory structure (no "-_" option):
Root \------- Images1 \------ Images2 \----- small \ \---- Images1 \ `--- Images2 `-- medium \---- Images1 `--- Images2Flat thumbnail directory structure (with "-_" option):
Root \------- Images1 \ \---- small \ `--- medium `---- Images2 \---- small `--- medium
name reverse datethen the current directory is sorted by name, and all subdirectories are sorted by reverse date.
03/07/01 - PH Created. 04/09/01 - PH Added Next/Prev links to image frame. 04/11/01 - PH Added optional comment to image.list file. 04/17/01 - PH Fixed bug with spaces in prev/next dir name. 04/24/01 - PH Changed directory structure and added _RELDIR_. 04/25/01 - PH Modified to work on a MacOS too, and added capability to read arguments from 'icat.args'. 04/27/01 - PH Added ImageInfo(), so now 'hu' is not required. 05/06/01 - PH Added ability to specify relative path in image.list. 05/10/01 - PH Added _RELDIR_ support to -J option. 06/04/01 - PH Added icat_top_comment.txt feature. 06/05/01 - PH Added -f option and check before overwriting a file. 06/06/01 - PH Put semicolon after "'" substitution. 08/10/01 - PH Added "sort.by" file. 09/10/01 - PH Additions to "sort.by" file. 10/08/01 - PH Added AppleScript in MacOS version to scale images using GraphicConverter. 10/11/01 - PH Added "-_" option to specify flat thumbnail directory structure instead of the default hierarchical scheme. Also added "-M", "-S", "-L" and "-W" options. 10/18/01 - PH Changed to write temporary files then rename when complete to allow cataloging active web pages. 10/31/01 - PH Added doc.open() before writing to new document. 12/17/01 - PH Added state file option to speed rebuilding of large catalogs (and -w and -g options). 01/30/02 - PH Read icat.args from dir specified on command line. Added support for MacOS X (now auto-sense line terminator for input text files). 02/01/02 - PH Added -r option to remove EXIF block from generated jpeg images. 03/09/02 - PH Added -% option 03/31/02 - PH Added David Purdie mods & long command line args 04/30/02 - PH Fixed minor problem with spaces in quoted strings for arguments read from file 06/11/02 - PH Put modification history back into script file 06/12/02 - PH Fixed a couple of minor HTML formatting problems 08/02/02 - PH Fixed bug in CleanJPG() 08/25/03 - PH Changed to show pictures in proper order (regardless of tall or wide) when using right/left buttons. 09/29/03 - PH Display large file sizes in MB 10/20/03 - PH Speed up CleanJpg() routine 11/03/03 - PH Add handling of _JFR and raw files 11/09/03 - PH Look for raw file for all JPG files 11/10/03 - PH CleanJpg() now removes all application markers 12/09/03 - PH Added --jpg_from_raw option 12/10/03 - PH Added automatic lossless rotation to jpg_from_raw. Also sets proper date/time for raw and jfr files. 12/17/03 - PH Added ability to display EXIF information 12/24/03 - PH Added download and autorotate options 12/30/03 - PH Added handling of preview images. 01/03/04 - PH Only download JPG and raw files 01/06/04 - PH Use binmode to write JpgFromRaw and Preview files. 01/07/04 - PH Added --frame option. 01/13/04 - PH Added --date_format option 01/19/04 - PH Added ability to remove JPG from RAW file (--clean_raw) 02/15/04 - PH Update for new ExifTool API 02/23/04 - PH Move ExifTool to Image::ExifTool 03/01/04 - PH Change ExifTool options names 03/31/04 - PH GetDescription() must be called with ExifTool object 05/03/04 - PH Changed " to \" in icat.args button mouseovers 10/07/04 - PH Set ExifTool Duplicates option to zero 03/12/05 - PH Update because ExifTool now returns binary data as reference 06/19/05 - PH Don't save prevew if it is smaller than medium image 08/21/05 - PH Also download MOV and WAV files 09/16/05 - PH Improved handling of failed 'convert' commands 05/25/06 - PH Use frame target instead of JavaScript when opening big image (makes downloads easier and maybe avoids popup squashing problem) 01/04/07 - PH Added tooltips 02/11/07 - PH Added ability to use multiple -raw options 05/20/07 - PH Added -O (--only) option 09/02/07 - PH Added support for AVI movies and download THM images 10/30/07 - PH Added full support for PEF images 11/14/07 - PH Added --tags_from_raw option 11/19/07 - PH Fixed a couple of things which caused warnings in Safari debugger 01/01/09 - PH Document --only and change logic 05/03/09 - PH Get tag from JPG instead of RAW if --tags_from_raw is used 11/18/10 - PH Use Copy1:PreviewImage if no JpgFromRaw available 07/24/12 - PH Added google maps link for GPSPosition 08/07/12 - PH Set Orientation to Normal after rotating JpgFromRaw 08/18/12 - PH Added MP4,MTS and M2TS to video file types 02/25/16 - PH Added support for left/right keys 11/20/17 - PH Added support for PNG images 07/09/18 - PH Added support for hidden directory 02/08/19 - PH Use THM thumbnails for video 09/26/19 - PH Only update list and index files if they changed 11/29/19 - PH Write local.html files for local viewing
Similarly, file names that contain funny characters may cause problems. Spaces ( ) and single quotes (') are converted so they are OK, but double quotes ("), forward slashes (/), and possibly some other funny characters may still cause some problems.
ICAT calls the Unix "convert" utility or the Classic MacOS application "GraphicConverter PPC" to resize the images for thumbnails. It can still be used on non-Unix/Mac systems, but on these systems the thumbnail images must be generated manually if "convert" is not available. "convert" may be obtained for OS X by installing the imagemagick package (using Fink, this is done by typing "fink install imagemagick").
On Classic MacOS, the script may fail if GraphicConverter isn't allocated enough memory to resize the images. If this happens, try increasing the application memory size for GraphicConverter.
The image size routines in ICAT are based on the very useful WWWis utilities by Alex Knowles.
Thanks to Hans Munthe-Kaas for submitting a bug fix for a problem with creating directories in OS X.
Thanks to David Purdie for adapting ICAT for Windows, and for writing the README.WINDOWS.
Thanks to Ralph Bradley for pointing out some HTML formatting problems.
Questions/comments can be directed to philharvey66#gmail.com