General bug fixes
[bpgallery.git] / README
1 Introduction
2 ------------
3 bpgallery is a small static gallery generator, it generates an index file and
4 thumbnails of your images. The index file is generated in the image folder,
5 icons in a subfolder called icons.
6
7 Requirements
8 ------------
9 The ImageMagick tools (convert and identify)
10 bash
11 GNU find
12 GNU xargs
13 sed
14
15 Installation
16 ------------
17 Copy the file bpgallery.sh to a directory in your PATH.
18
19 Usage
20 -----
21 bpgallery.sh /path/to/image/files
22
23 Also, the following files, if placed in the images directory, will be used to
24 generate part of the index page:
25         description.txt - a simple text file containing paragraphs to go at the
26                           beginnings of the index page
27         captions.txt - filename<tab>caption style file, it'll add a caption to
28                        the images on the index page.
29 The following environment variables can also be used:
30         TITLE - the title of the gallery
31         WIDTH - the width to make the icons
32         BPGALLERY_THEME - set the theme to use (described below)
33
34 Example Usage:
35         TITLE="My Funky Gallery" bpgallery.sh /path/to/image/files
36
37 Themes
38 ------
39 Theme support is very rudimentary, basically you create functions for each of
40 the parts of the template, and put them in a file named the same as the theme.
41 The functions that you need to declare are as follows:
42         bpgallery_ThemeName_head()
43                 what's it for?:
44                         This sets up the header for the page, generally
45                         everything until the first picture. So, the title bar
46                         and any menus you would like to use
47                 available variables:
48                         $TITLE       - the title for the index page
49         bpgallery_ThemeName_tail()
50                 what's it for?:
51                         Closes the page, is the last thing to be printed.
52                 available variables:
53                         None
54         bpgallery_ThemeName_description()
55                 what's it for?:
56                         if there's a description set up (i.e. a description.txt
57                         file) then this is what it'll be wrapped in. It comes
58                         just after the _head.
59                 available variables:
60                         $DESCRIPTION - the content of description.txt
61         bpgallery_ThemeName_stylesheet()
62                 what's if for?:
63                         It generates the stylesheet for the page.
64                 available variables:
65                         $WIDTH       - the width of the images
66                         $MAXHEIGHT   - the maximum height of the image
67         bpgallery_ThemeName_thumbsline()
68                 what's it for?:
69                         Whatever is in here is generated per thumbnail.
70                 available variables:
71                         $filename    - the name of the file
72                         $caption     - the caption as got from captions.txt
73
74 If any of the functions are not defined in a theme then the default theme
75 function will be used instead. The default theme is clean and simplistic, this
76 is deliberate!
77
78 Author
79 ------
80 Brett Parker:
81         e-mail: <iDunno@sommitrealweird.co.uk>
82         www:    http://www.sommitrealweird.co.uk/