Content-type: text/html Manpage of nagg

nagg

Section: Version 0.9.7 (1)
Updated: March 2006
Index Return to Main Contents

 

NAME

nagg - online photo gallery generator  

SYNOPSIS

nagg [-option1 -option2 ...]  

DESCRIPTION

nagg is an easy to use bash shell script that generates nice looking XHTML compliant static web pages. The simplest way to make a gallery is to run nagg in a directory containing either jpg, gif or png files. To check the output load index.html in your web browser. You can adjust the way the generated pages look by using the options listed below or by editing the indextemplate.html, slidetemplate.html or nagg.css files that are stored in $HOME/.nagg/.

The image files that are to be processed can not contain spaces in their file names. nagg will ignore any files with spaces. See the --norm option below on how to easily normalize your image names.

nagg relies on bash, sed, ls, grep, awk, and cat. The versions of these files used when writing nagg are listed below. This doesn't mean that these versions are required, only that I know that it works with these. Chances are it will work with just about any current version.

        bash 3.1.7
        sed 4.1.5
        ls (GNU coreutils) 5.94
        cat (GNU coreutils) 5.94
        grep 2.5
        awk 3.1.5
        ImageMagick 6.2.6
 

OPTIONS

-c
The first time this option is used it creates a hidden file call .captions in the directory with the images being processed. To add your captions simply edit the captions file in your favorite editor and place the comment after the ---- deliminator. Each comment must be on one line and can contain HTML tags. You can rearrange the image order by changing the order the captions are listed. You can also remove an image from the slide show by placing a pound (#) at the beginning of the line. Using nagg -c again will read in your .captions file, include your captions in the slides, and rearrange the image order if necessary.
-C
Like -c but uses the image file names as captions, stripping off the file extension, when generating the .captions file.
-d <dir>
Tell nagg to work on files in directory <dir> instead of the current working directory.
-f
Force thumbnail and slide regeneration. Using this option will clear all existing HTML, slide, and thumbnail files and regenerate them. To save time nagg will skill creating thumbnail and slide files if they already exist. If you want to resize your thumbnails with -y or your slides with --bigy you must use the -f option.

The -f option blindly deletes all HTML files in the directory where nagg is working in. Don't use the -f option if the directory contains HTML files you want to keep. This will be fixed as some future date.

-h
Display brief help, same as --help.
--help
Display brief help, same as -h.
-i <file>
The name of the main thumbnail index file. The default is index.html, which is valid for most web servers.
-k
Use the image captions as the title for the HTML slides. By default nagg uses the base image file name for the title.
-s
Does not generate any HTML slides. The thumbnails on the main index page will link directly to the image files themselves.
-t <>
The title to use for the main index file. The value given will display as the header of the index file. To have a title with spaces in it you must quote the argument to this option.
-u
Write the image captions under each thumbnail on the index page. If you do not have a .captions file then this option is ignored. To place the image fine name stripped of it's extension run nagg -C followed by nagg -u.
-w <n>
Set the number of rows to have in the main index page. The minimum value is 2. Defaults to 5 rows.
-x
Omit the image count from the slides.
-y <n>
Scale all thumbnails to height n. The default height is 75.
--ad
Write the source images dimensions under the index thumbnails.
--as
Write the source images file size in k bytes under the index thumbnails.
--bigy <n>
Like the -y option but resizes the slide images instead of the thumbnails. This is convenient if your digital camera creates high resolution images that are to large to fit on a screen. The original images are not modified, instead the resized copy is stored with the .slide_ prefix and the slides link directly to the full sized image. You must use the -f option between runs if you want to change the value of --bigy.

If the --bigy option is not given then the slides will source in the original instead of a resized slide image.

--con options
Command line option to pass to convert (see the ImageMagick man pages for possible options). This will affect all thumbnails and slide images (not the originals). A few possible options are -quality N, -negate, -monochrome, etc. If passing multiple options or options with arguments to them be sure to quote the --con options.
--norm
This will normalize the original images by renaming them, replacing all spaces with underscores. This is an option of convenience, there are other tools available that will do a better job at making your file names sane.
--version
Print version and license information and exit.
--www
Make all nagg files world readable for web publication.
 

FILES

/usr/local/lib/nagg/indextemplate.html
The default index template file. This gets copied to $HOME/.nagg/ when nagg is first run.

/usr/local/lib/nagg/slidetemplate.html
The default file used to generate slides. This gets copied to $HOME/.nagg/ when nagg is firt run.

/usr/local/lib/nagg/nagg.css
The default style sheet. This gets copied to $HOME/.nagg/ when nagg is first run.

/usr/local/bin/nagg
The default location of the main nagg script.
 

SEE ALSO

ImageMagick(1), convert(1)  

COPYRIGHT

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 version.

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 details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA  

EXAMPLES

The most basic way is to just run nagg in a directory that contains jpg, gif or png files. Then open up index.html in your web browser and see how it looks.

Another example that will make slides at a height of 768, thumbnails at height 150, and include captions while forcing a regeneration of the thumbnail and slide files is:

nagg -f --bigy 768 -y 150 -c

Or to pass the -negate option to convert just do something like:

nagg --con "-negate"  

BUGS

There are no bugs that I know of at this time. Though, I'm sure bugs do exist. If you find any please send me an e-mail and let me know about it.  

AUTHOR

Brian Reichert <rignes@ptd.net>


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
FILES
SEE ALSO
COPYRIGHT
EXAMPLES
BUGS
AUTHOR

This document was created by man2html, using the manual pages.
Time: 01:40:19 GMT, March 07, 2006