- pynakotheka -

Author: Iñigo Serna, inigoserna AT telefonica DOT net
Version: 1.0.3, July 25th., 2006
License:

(C) 2005-6, Iñigo Serna

This software has been released under the GPL License, see the COPYING file that comes with this package. There is NO WARRANTY.

Last update:Tue Jul 25 22:22:17 2006

Table of Contents

Introduction

Not much to say, pynakotheka is a simple python script which generates static HTML photo albums to be added to web sites or to be burnt in CDs.

The gallery can contain folders and/or pictures and the folders can contain other folders and/or pictures, recursively. There are 4 views: folder, tree, thumbnails and photo detail (with or without exif info). You can even create your own templates easily.

Released under GNU Public License, read COPYING for more details.

Some inspiration from curator, another python gallery builder.

Here you have a demo site with some photos of my friends.

You don't need to install the script, uncompress the package and select the proper path of the templates when executing the program. Anyway, since v1.0.1 you can use the usual python process to install pynakotheka and let the program to find out where the templates are located:

# python setup.py install

These are the options:

Usage:  pynakotheka.py <options> [source_dir [target_dir]]

Arguments:
    source_dir       Location of the source photos, defaults to current dir
    target_dir       Directory where to save the gallery, defaults to current dir

Options:
    -h, --help       Show this text
    -q, --quiet      Don't show progress information messages, default SHOW
    -c, --color      Show information messages with colors, default NO COLOR

    -o, --copy-originals
                     Copy original images to the gallery, default NO
    -s, --thumbsize  Thumbnail size, defaults to 250
    -i, --imagesize  Image size, defaults to 640
    -d, --templates-dir
                     Path to templates directory, defaults to
                     "$PREFIX/share/pynakotheka/templates"
    -t, --template   Template to use, defaults to "default"

    --clean=all|images|html
                     Remove all files / images / html and style files
                     generated by the program

Templates

Each template has his own directory which must contain exactly these 7 files:

All of these files must exist in your template directory. If you don't need any of them, create an empty file anyway (yes, this could be improved).

The name of the template is taken from the directory name.

There are only three templates by now:

Thanks to http://wancam.precompiled.org/tdigs and http://photolib.sourceforge.net from which I've taken some ideas and html code for these templates.

If you design a new template, please contribute back to the community. Thanks.

Album folder description file

You can specify some information for each folder.

To do it, create a file called album.xml and place it in the base directory for the folder. This is the example included with pynakotheka (if you have installed the program you can find it in /usr/share/doc/pynakotheka):

<?xml version="1.0" encoding="latin1"?>
<album>
  <title>
    This is the title
  </title>
  <description>
    These photos were taken during our holidays in Mars last October
  </description>
  <sample_photo>
    path/to/photo1.jpeg
  </sample_photo>
  <omit_album>
    FALSE
  </omit_album>
  <omitted_files>
    <omitted_file>
      photo12.jpeg
    </omitted_file>
    <omitted_file>
      photo26.jpeg
    </omitted_file>
  </omitted_files>
</album>

Requirements and Download

FAQ

Q: It's a bit slow... what can I do?

A: Templates could be compiled (consult Cheetah Template documentation). Or you can generate the gallery after going to sleep.

Q: How can I disable exif information in my gallery?

A: Use the noexif template.

Q: pynakotheka crashes when using a template without "background.jpeg" file

A: File must exist. See Templates section.

CHANGES

Changes from v1.0.2 to v1.0.3:

  • support file names encoded in UTF8

Changes from v1.0.1 to v1.0.2:

  • now albums are sorted by creation time

Changes from v1.0 to v1.0.1:

  • distutils support. Now you can install pynakotheka
  • added a man page
  • fixed some typos in templates

TODO

Post v1.0 ideas:

  • more templates
  • define schema for templates: template.index
  • comments for photos

Rejected ideas:


[This documentation was generated with reStructuredText]