tnailer
ABOUT
SYNOPSIS
OPTIONS
DESCRIPTION
PREREQUISITES
RECENT CHANGES
Version 1.2
Version 1.1
ACKNOWLEDGEMENTS
Version 1.1
KNOWN BUGS
AUTHOR
ABOUT
I didn't have time to make a detailed page for this script, so this will have to do.
This page is essentially the POD output one gets when 'tnailer -h' is run. I'll put up more
when I have time. In the meantime, read below for more information.
Basically, this is a script I wrote to automate pulling images off my wife's SmartMedia reader and
making web-based galleries out of them. It's a simple script, but a big time-saver (for me, at
least) for what it does.
The latest version is 1.2.
You can download
tnailer.tar.gz
or you can take a look at some examples of it's output
here
and
here
Installation is as simple as it gets: untar the archive above somewhere in your path (like /usr/local/bin).
Then run
tnailer -h
to see what options you want.
SYNOPSIS
tnailer [options]
Options:
[-h]
[-c]
[-s ]
[-q ]
[-d ]
[-o ]
[-t ]<br>[-f]<br>[-y]<br>[-w <N>]<br>[-k <NN%NN%NNN>]<br>[-x]<br>OPTIONS<br>-h<br>Prints this help message.<br>-c<br>Creates HTML docs with specifically colored background, foreground, table, etc. elements which match 27.org. Takes no arguments.<br>-s<br>Reduces originals by specified percentage. Must be of the form ``NN%''. Default is ``50%''<br>-q<br>Sets the quality (JPEG/MIFF/PNG compression) level of the resulting images. This must be an integer between 1 and 100, inclusive, with 100 being best quality (and 1 looking like rat doot). This only affects the larger images, whose default is 75; thumbnail images will have a quality level of 25.<br>-d<br>The path (either relative or fully qualified) to your source image files. The current working directory is used if not specified.<br>-o<br>The path where you'd like the image gallery output put. A subdirectory will be created at this location and the image files and HTML pages will be placed in it. The name of the subdirectory is based on the date and time, so the script can be run more than once (if you're trying out scaling or quality levels or something) without overwriting anything. The current working directory is used if not specified.<br>-t<br>The title of album, which will appear on the HTM pages. Enclose this in double quotes if it's longer than one word (to prevent each word being seen as individual optiosn and to escape shell metacharacters). If omitted, the date (which will match your system's<br>ctime()<br>ouput) is used.<br>-f<br>Prints a ``Back to gallery'' footer on index page. Probably useful only on 27.org, unless you have a page called 'gallery.html' at the top level of your web root or you change the href. Takes no arguments.<br>-y<br>Answers 'Y' to the first prompt. Takes no arguments.<br>-w<br>Specifies the number of columns wide for thumbnails. Default is 5.<br>-k<br>Default is ``20%40%300'' which means Reduce thumbnails to 20%, but only reduce thumbnails smaller than 300 pixels to 40%.<br>-x<br>When enabled, EXIF data (if any is found) for each image will be printed at the bottom of it’s full-size page.<br>DESCRIPTION<br>Given a user-definable directory which contains JPEG, PNG, TIFF or (possibly) GIF images, this script creates a series of smaller images, one per html page. It also creates an index.html page for the series, and thumbnails on that which to link to the individual html docs which contain the larger images. Each thumbnail page will have links to the last and next image pages.<br>A subdirectory will be created at this location and the image files and HTML pages will be placed in it. The name of the subdirectory is based on the date and time, so the script can be run more than once (if you're trying out scaling or quality levels or something) without overwriting anything. The current working directory is used if not specified.<br>PREREQUISITES<br>You will need the Image::Magick and Image::Exiftool Perl modules installed for this script to work.<br>RECENT CHANGES<br>Version 1.2<br>Added option to print EXIF data on image pages (-x switch)<br>Version 1.1<br>Made timestamp directory prettier (but still unique)<br>Added option w to specify the number of columns (default 5)<br>Added option k to specify reduce percentages<br>Added option y to answer yes to first prompt<br>Fixed an off by one error when ``no images processed''<br>Fixed a regexp error when filename contains more than one dot<br>Fixed an error where html size tags were wrong if image was too small to be reduced<br>Running under 'use strict' and with warnings on<br>Changed how directories are read to allow for better sorting<br>Fixed bug where empty directories would be created if no images were found<br>Re-arranged and cleaned up some code (``user'' editable variables now at top as well)<br>Info messages now sent to STDOUT unbuffered for (maybe) a more responsive feel<br>Default quality now 75<br>ACKNOWLEDGEMENTS<br>Version 1.1<br>Thanks to Jon Gabrielson <<br>jon [AT] directfreight [dot] com<br>> for a lot of the bigger changes.<br>KNOWN BUGS<br>I don't know of any bugs in the program, but one current limitation is that there is no consideration given for large image collections. If you have 250 images, then your index page will have 250 thumbnails on it. This might be excessive. I first wrote this script to pull images off a SmartMedia card and make galleries. Since the largest SmartMedia card I have only holds about 80 images, I didn't see the ``one large index page'' thing as being much of an issue. Right now, the only work-around is to break up image collections into useable chunks.<br>Please report any bugs you find to me at<br>tnailer [AT] 27 [dot] org<br>and I'll try to get them fixed as soon as I can. Also feel free to fix any bugs you find. Send me a patch (or the fixed script) if you do.<br>AUTHOR<br>William Rhodes <<br>tnailer [AT] 27 [dot] org<br>Copyright (C) 2002 William Rhodes <<br>tnailer [AT] 27 [dot] org<br>This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later<br>version. You can obtain a copy of the GPL at<br>This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more<br>details.</p></div> </div> <div class="detail-actions"> <a href="/search?q=27.org" class="btn">Same domain →</a> <a href="/search?q=tnailer" class="btn btn-secondary">Similar titles →</a> </div> </article> </main> <footer class="site-footer"> <div class="container"> <p>C U Cyber History — Public Interest Web Archive</p> <p class="footer-small">Preserving fading web memories. Discover history that once existed.</p> </div> </footer> <script id="chat-i18n-en" type="application/json">{"button_label":"Need Help?","placeholder":"Ask us anything...","title":"CUCH Assistant","subtitle":"How can we help you?","send":"Send","close":"Close","folder":"/var/www/cu","greeting":"Hi! Welcome to CUCH.org. How can I help you today? Feel free to ask about our archive, search, or anything else!","error":"Sorry, our service is temporarily unavailable. Please try again later.","banner_text":"Need help? Ask our AI assistant!"}</script> <script src="/static/js/chat-widget.js"></script> </body> </html>