]> git.defcon.no Git - plsgen/blob - README
Four new features, two bugfixes. Version 0.3 code
[plsgen] / README
1 Perl Simple Gallery Generator v 0.3
2 ==============================================
3
4 Requirements
5 ------------------------
6
7 Perl modules
8 * Image::ExifTool
9 http://search.cpan.org/~exiftool/Image-ExifTool-8.15/
10 * AppConfig
11 http://search.cpan.org/~abw/AppConfig/
12 * Getopt::Long (shipped with perl5->)
13 http://search.cpan.org/~jv/Getopt-Long-2.38/
14
15 Programs:
16 * convert from ImageMagick
17 http://www.imagemagick.org/
18 * jhead
19 http://www.sentex.net/~mwandel/jhead/
20
21 And, of course you probably want to publish whis on
22 a Web server. The generated result is static HTML,
23 so no requirements at all exist in regard to type
24 and functionality of HTTP daemon.
25
26
27 Installation
28 -------------------------
29
30 * Place the navigation JavaScript and the CSS file
31 somewhere convenient on your Web server.
32
33 * Place the template files (index.tpl, full.tpl)
34 where You want, I prefer having them located in
35 /usr/local/share/plsgen
36
37 * Place the executable script so that execution
38 is practical. I place it as /usr/local/bin/plsgen so
39 that I have it in my search path.
40
41 * Take a look at the shipped configuration file.
42 plsgen looks for a config file as /etc/plsgen.cfg,
43 as ./plsgen.cfg or ../plgen.cfg relative to where
44 it is executed. Alternatively, the --config option
45 allows you to override the default locations.
46 The shipped config lists all configuration options,
47 along with their default values (used if no config present).
48
49
50 Execution / Use
51 -------------------------
52
53 plsgen is written to be ececuted in a directory filled
54 with image files, and will create all its data
55 in this directory. The resulting album will list
56 all present image files of types JPG, PNG and GIF.
57 A display-size and thumbnail image will be created
58 for each image, and will be stored in the sub-directories
59 view and thumbs (respectively).
60
61 Recognized commandline options are:
62 --title='Your album title'
63 Sets the album title. Title will be stored in .title
64 If no title is given, it will be read from .title, if present
65 --htmlonly
66 Add this option to only generate HTML files
67 No image operations will be performed with this option
68 --noexif
69 Forces EXIF data block not to be written to HTML output
70 --config=/path/to/config
71 Overrides default config file location.
72 Default is to look for ./plsgen.cfg, then ../plsgen.cfg
73 and finally /etc/plsgen.cfg.
74 --help
75 Displays a list of available commandline options
76
77
78 File overrides: comments, title, index image.
79 ------------------------------------------------------
80 plsgen supports static gallery- and image comments. To get descriptive
81 text or author comments on a gallery, add a file with the name 'comment.txt'
82 to the directory before generating the album. The file is read, and injected
83 verbatim, into all index* files generated, pre- and post-padded with the
84 content of the comment-{pre,post} configuration variables.
85
86 To add an image comment, create a text file named identically to the image
87 filename, plus the suffix .txt. So, if an image is named 'AnImage.JPG', the
88 corresponding comment file should be named 'AnImage.JPG.txt'
89
90 If you wish to pre-seed the gallery title, you may do so by putting the
91 gallery title on a single line in a file named '.title'. The title is read
92 from this file if no title is given on the command line, and it is present.
93 Note that if a title is given on the command line, that title will be used,
94 and also will overwrite any content in the .title file.
95
96 A reference to an "index image", simply the first image in the set,
97 is saved in the file '.indeximage', if this file does not previously exist.
98 To override the chosen index image, simply put the filename you would
99 rather have used in this file. The index image is used bu the included
100 example index.php and rss.php
101
102
103 Index front-end and RSS support
104 -------------------------
105 Included is a sample front-end index, and an accompanying RSS
106 generator written using PHP. To use these, take a look at the PHP
107 source, make personal adaptation (at least change references to my site
108 to your own), and place both php files, plus indexstyle.css in a
109 directory where you keep your albums as sub-directories.
110
111 E.g.:
112 Web Root
113 |-- galleryset1
114 | |-- image1.jpg
115 | |-- image1.jpg.txt
116 | |-- image2.jpg
117 | |-- comment.txt
118 | `- .title
119 |-- galleryset2
120 . ...
121 |-- nav.js
122 |-- style.css
123 |-- index.php
124 |-- indexstyle.css
125 `- rss.php
126
127 Changelog
128 -------------------------
129 * 0.2 -> 0.3
130 # DONE: Config option for size of view/thumbnail
131 # DONE: Config option to disable arrow-up navigation
132 # DONE: Config option to disable image rescaling ?
133 # DONE: Multithreaded resizing, multiple resizes at the same time
134 # BUGFIX: Version number now gets updated between versions :P
135
136 * 0.1 -> 0.2
137 # DONE: filename.txt for file comments
138 # DONE: comment.txt for album comments
139 # DONE: Save reference to main-index thumbnail.
140 # DONE: Add command line option to disable EXIF block output
141 # BUGFIX: Now generates for all images, including the last in set.
142 # BUGFIX: Performs rotation according to EXIF
143
144 Todo-list
145 -------------------------
146 # TODO: Stripping of image suffix for HTML file w/config option?
147 # TODO: Templating of EXIF
148 # TODO: Priority/sorting of EXIF tags
149 # TODO: Possibility for hide/show EXIF
150 # TODO: Clear old generated files and meta on regen
151 # TODO: Use perlmagick et. al instead of convert/jhead..
152 # BUG: The naive handling of filenames breaks on special characters
153
154
155 Lisencing
156 -------------------------
157 Copyright (c) 2010, Jon Langseth
158 All rights reserved.
159
160 Redistribution and use in source and binary forms, with or without
161 modification, are permitted provided that the following conditions are met:
162 * Redistributions of source code must retain the above copyright
163 notice, this list of conditions and the following disclaimer.
164 * Redistributions in binary form must reproduce the above copyright
165 notice, this list of conditions and the following disclaimer in the
166 documentation and/or other materials provided with the distribution.
167
168 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
169 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
170 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
171 DISCLAIMED. IN NO EVENT SHALL JON LANGSETH BE LIABLE FOR ANY
172 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
173 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
174 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
175 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
176 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
177 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.