WebThumb

From PDWiki

Jump to: navigation, search

Contents

About This Project

WebThumb is a command line utility that uses a simple markup language to generate bare-bones HTML image galleries. It was written to simplify the process of taking a directory full of vacation photos and creating a web page with thumbnail links.

Usage

To use WebThumb:

  1. Create a file called webthumb.txt and place it in the directory with your image files.
  2. Copy and paste a list of the image files into the webthumb.txt file.
  3. Put a line at the top with the text \output=index.html, or whatever file you want the HTML to go to.
  4. (optional) Type descriptions after the image file names.
  5. (optional) Add additional configuration settings after \output=... (see below).
  6. Run webthumb.
  7. Uploading the resulting HTML, source images, and thumbs/ directory to your web server.

Configuration settings are listed by webthumb -h:

% webthumb -h

Usage: webthumb [input file]
Input file defaults to webthumb.txt.
Syntax for input file:
--------------------------
IMAGE Image Caption : thumbnail IMAGE with caption 'Image Caption'
--------------------------
#<insert html here> : pass html straight through to output file
--------------------------
\variable=value     : set configuration variable
 output=FILE (specifies HTML file to write to, default stdout)
 height=NUM  (specifies max height of thumbnails, default 200)
 width=NUM   (specifies max width of thumbnails, default 200)
 columns=NUM (specifies number of columns in table, default off)
 spacing=NUM (specifies space in pixels between thumbnails)
 quality=NUM (specifies thumbnail quality on a scale of 0-100)
 padthumbs   (pads all thumbnails to max height and width)
 padbgcol=C  (uses HTML color C as background for padded thumbnails
 imgattrib=A (inserts string A into image tags, i.e. <img A ...>
 link=URL    (redirects next link to URL instead of source image)
 captions    (places captions under each image [requires columns])

License

Copyright (c) 2008, Sam Stafford

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  • Neither the name of the Perforce Public Depot nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Recent Changes RSS_Feed.gif

  • Change 5985 on 2007/07/17 by sam_stafford@samwise-rivendell
      Webthumb build.
  • Change 5984 on 2007/07/17 by sam_stafford@samwise-rivendell
      Fix a couple of bugs and made "titlesonly" the default; setting
      "captions" overrides it. The new captions setting also forces
      "columns" to a non-zero value, since the linebreaks in the captions
      break the non-table mode.
  • Change 5971 on 2007/06/30 by sam_stafford@samwise-rivendell
      Updated Webthumb build.
  • Change 5970 on 2007/06/30 by sam_stafford@samwise-rivendell
      New table-less output mode for Webthumb. Does all the same
      thumbnailing and padding but generates a big wrapping row instead of a
      table. This is the new default; if you want a set number of columns
      henceforth you'll have to use \columns explicitly.
  • Change 5696 on 2006/10/07 by samwise@samwise-rivendell
      DLLs for new Webthumb build.


Personal tools