Twig is an image gallery program. You have a directory with subdirectory structure with images. Twig generates for each image 3 levels of diminished images and 3 level of thumbnails:
Twig keeps a clickable structure of HTML files, each directory has an own HTML page with listing and each file has own HTML page with links to various sizes of the images under thumbnails and with EXIF information and image comment.
Twig can work with JPG and PNG images. Maybe also with GIFs but I am not sure ;-)
If you change anything in the gallery (add directories, files, change files, delete files), you just need to rerun the "regen" script. Twig automatically detects all changes and updated in the HTML structure. Thumbnails and scaled down images are automatically regenerated if needed. Most time-intensive work is however not done if not necessary.
Twig assigns every image an unique hexadecimal identifier. If an image is deleted, the identifier remains unused. Twig is written with 128 bits allocated for the identifier, so it is physically impossible to exhaust the identifiers.
The purpose of the identifiers is to allow simple linking of images from webpages with just specifying the identifier. The identifiers are stored in tns/database which is in GDBM format. Back up this file frequently as damage to it can destroy all the image links on your website.
JPEG comments of the JPEG images are parsed. The part of the comment up to first newline is displayed under the image thumbnail in directory listings. The whole comment is then displayed on the image's own HTML page. Newlines in the comment are replaced by paragraph separators.
Updating the gallery is atomic. If you run the update and break it in the middle, you don't get an inconsistent state. Regenerated thumbnails and downsized images are moved to the destination immediately, the rest is put into a directory aside and then moved at once.
Twig was written for the Ronja website. If the directory name is "ronja" (now I don't remember if it works only for toplevel or also for lower levels), the HTML pages will be generated with a heading of Ronja and Twibright labs logo.
You need the following software to run Twig:
Twig was written by Karel 'Clock' Kulhavy, Write bugreports to this e-mail: Warning: Missing argument 2 for _insertimage(), called in /home/clock/www/twibright.com/ronja/utils/twig/index.php on line 117 and defined in /home/clock/www/twibright.com/ronja/obr.php on line 31 Notice: Undefined variable: alt in /home/clock/www/twibright.com/ronja/obr.php on line 33 Warning: getimagesize(/firstname.lastname@example.org): failed to open stream: No such file or directory in /home/clock/www/twibright.com/ronja/obr.php on line 20
Twig is under GPL.
|Thumbnail directory name||Size|