Help:Mkpicdir
From MMAE
The mkpicdir command is a perl script written by Steven Dick to automatically make index pages for directories of pictures to be posted on the web.
mkpicdir automatically does the following things:
- scans the current directory for images with filenames ending in jpg, JPG, gif, or png
- checks the dimensions on new images and looks for related images
- builds or rebuilds related thumbnails and small versions of images where necessary
- builds an index.html file displaying thumbnails and related links to each picture found
mkpicdir is designed to be run and rerun in the same directory over and over, as pictures are added or updated. It will only rebuild thumbnails of images that are new or have been updated.
Contents |
[edit] Command Line Options
- -q
- quick, only make index and thumbnails, don't regenerate missing sizes
- -Q
- very quick -- rebuild index without regenerating any images
- -w
- wait until new items appear
- -r #
- rescan if some pictures weren't ready; expect # new pictures
- -f
- don't wait on the first pass (implies -w)
- -b
- beep when one (or N) pictures left
- -v
- verbose (not used much)
[edit] Permanent Options (file stored)
A number of config files can be created in the directory along with the images to adjust the behavior of mkpicdir. (Note: many of these config files begin with a period, which makes them invisible in unix unless you use the ls -a command.) These files are:
- .geom
- contains cached image sizes and option flags for mkpicdir
- .head or head.txt
- contains html format material to prepend to the index file
- .tail or tail.txt
- contains html format material to append to the index file
- .captions or captions.txt
- contains (one per line) an image basename and a short caption to go under its thumbnail
- .dircaption
- The last line in this file is used as a caption for this directory its listing in the parent directory.
- .tag
- basenames listed in this file (one per line) are marked with a * in the thumbnails
Original image filenames should not contain more than one period. For example, the original image name might be basename.jpg. mkpicdir will then generate related the images basename.small.jpg and basename.thumb.jpg, as necessary. Images with names containing crop or orig are ignored, so if you need to make small images to the original image, you can rename it with one of these (i.e., basename.orig.jpg), and then make the edited image available for web viewing.
Images are classified as one of the following sizes:
- size resolution # name => [ min typical reqd]
thumb * 150
front 240
small * 600
large 700
huge 1500
Zero size images, oversize generated images, and images older than the base image are regenerated. Image sizes marked(*) above are always generated if the base image is larger.
[edit] The .geom File Options
The .geom file contains image size cache lines and option lines starting with a period:
filename x y timestamp
.flags option list
set various one word options
- .vote wordlist
- replace voting options (default list (promote demote front rotate delete crop)
- .morevotes wordlist
- add voting options to current list
- .skip basename list
- skip images with the given basenames
- .ncols 4
- number of columns of thumbnails (default is 4)
- .size size_name min typical required?
- replace or add an named image size (last column is a true/false flag)
- .clearsizes
- drop all default image sizes
[edit] The .geom .flag options
The following options are available on the .flags line in the .geom file:
- vote
- enable voting forms and per-thumbnail check boxes
- name
- label thumbnails using image basename
- namecase
- capitalize filename as a proper name
- dir
- list directories in bullet list (with dir captions)
- dirtable
- list directories in a table (with captions)
link resolve symbolic links for hrefs (best for cdroms)
