Add in themed pages for the fullsize images
[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         BPGALLERY_THEME_DIR - set an extra location to look for themes
34         OUTPUTHTML - sets the script output to be wrapped in a <pre> block
35         GENERATEPAGESFORFULLSIZE - decide wether to generate pages for the full
36                                    size images or not
37
38 Example Usage:
39         TITLE="My Funky Gallery" bpgallery.sh /path/to/image/files
40
41 Themes
42 ------
43 Theme support is very rudimentary, basically you create functions for each of
44 the parts of the template, and put them in a file named the same as the theme.
45 The functions that you need to declare are as follows:
46         bpgallery_ThemeName_head()
47                 what's it for?:
48                         This sets up the header for the page, generally
49                         everything until the first picture. So, the title bar
50                         and any menus you would like to use
51                 available variables:
52                         $TITLE       - the title for the index page
53         bpgallery_ThemeName_tail()
54                 what's it for?:
55                         Closes the page, is the last thing to be printed.
56                 available variables:
57                         None
58         bpgallery_ThemeName_description()
59                 what's it for?:
60                         if there's a description set up (i.e. a description.txt
61                         file) then this is what it'll be wrapped in. It comes
62                         just after the _head.
63                 available variables:
64                         $DESCRIPTION - the content of description.txt
65         bpgallery_ThemeName_stylesheet()
66                 what's if for?:
67                         It generates the stylesheet for the page.
68                 available variables:
69                         $WIDTH       - the width of the images
70                         $MAXHEIGHT   - the maximum height of the image
71         bpgallery_ThemeName_thumbsline()
72                 what's it for?:
73                         Whatever is in here is generated per thumbnail.
74                 available variables:
75                         $link        - the page/image to link to
76                         $filename    - the name of the file
77                         $caption     - the caption as got from captions.txt
78         bpgallery_ThemeName_page()
79                 what's it for?:
80                         It generates the pages for fullsize image pages
81                 available variables:
82                         $filename    - the name of the image
83                         $previouspage - the URL for the previous page
84                         $currentpage - the url for the current page
85                         $nextpage    - the url for the next page
86                         $caption     - the image caption
87
88 If any of the functions are not defined in a theme then the default theme
89 function will be used instead. The default theme is clean and simplistic, this
90 is deliberate!
91
92 Author
93 ------
94 Brett Parker:
95         e-mail: <iDunno@sommitrealweird.co.uk>
96         www:    http://www.sommitrealweird.co.uk/