Quick links


For my cousin Stephane
That's not a valid item!!!

Project pystaticgallery

Created: 2008-02-08 14:02:00
Modified: 2008-12-13 06:50:00

This page talk about PYStaticGallery

Table of Contents

Introduction

Generates a static html photo gallery from images. It's a Python script that generates a static html photo gallery from one or more directories of gif/jpg/png images. It supports themes and is very customizable. It includes the ability to display comments and `EXIF` informations for each image in a simple clean layout.

The `pystaticgallery` is mainly based on the `jigl Perl` script. But the `pystaticgallery` script is completely rewritten (pythonized) and have some more features. It's really easy to make an static html gallery with this script. Just run `pystaticgallery` in a directory that contains images. The script then make 3 directories, web, scale and info. The script make automatically the scales of the image. Actually the script needs to be used in the CLI interface. But we never know, it's been possible that later there would be a little GUI interface for these that have a need of.

Examples galleries

You can look how the `pystaticgallery` looks like before you install it.

Features

pystaticgallery is still in developpement, so some other features can been added. If you want some specific features, you can always communicate it to my so that in the next release these can be are added.

  • Show the process in the console while pystaticgallery make the image gallery.
  • pystaticgallery is easy to install easy to use.
  • Generating an info page with EXIF information from photos.
  • Get slide comments from EXIF information.
  • Cross platform GNU/Linux, Windows (w2k and above) but all other OS is supported where Python, ImageMagick an jhead run on it.
  • You can define an title for the gallery image.
  • You can define an main comment for the index page. You can also disable it.
  • Go back button to where you want. You can also disable the back button.
  • Defining how many pictures on an row.
  • Defining how many pictures on each index page.
  • Activate/Deactivate the comment of the `EXIF` photo on the slide html page.
  • The ability to detect if the scaled images are already done. So you gain time and the `pystaticgallery`` not again loose time to scale the different images.
  • Easy to customize. You can easy make your own theme.

Requirements

Before installing `pystaticgallery` you need to install some other stuff. It's all open sources software i use. If you have an GNU/Linux distribution, you can probably install these requirements with the package manager. If you use the deb file of the `pystaticgallery` the requirements are automatically installed.

If you have an Microsoft Windows system, you need to get the binary requirements.

  • Python 2.4 - I suggest to install the `ActivePython` package of `ActiveState`` for `Microsoft Windows` users. Like these provide some additional modules api for windows in one installer. But you can install Python of the python.org site. Like for this application. There are no special modules needed.
  • ImageMagick - Needed to scale the images.
  • jhead - Needed to get the EXIF informations of the image.

Download

You can download it for different systems.

Download for Debian

Debian users can add an line to the /etc/apt/sources.list to get the latest deb version.

deb http://dvm.zapto.org:8080/debs

Then as root user update the packages list:

apt-get update

Download for Windows

Not yet available. Need to build an standalone executable (py2exe) and an installer (nsis).

Download Source

Not yet available. Like we are a bit short in space. I want to make a subversion reposition online. Actually we not directly provide here the source. You can easy get the source of the debian binary for example. It's just an Python script. Extract the deb file with '7-zip' (MS Windows and GNU/Linux) or 'ar' (GNU/Linux) for example.

Install instructions

pystaticgallery can be installed in different way, depending of the system you have. So refer you to the type of system you have.

Debian binary

If you have download the deb file manually. You can install the deb pystaticgallery. As root user execute the follow command:

dpkg -i pystaticgallery.x.x.x.deb

If you need to de install it completely and purge all his files, as root user do:

apt-get remove --purge

If you have add the above URL (See Download for Debian) in the /etc/apt/sources.list, you can easy install/remove/update the package as root user:

So you are sure you always get the latest version of the application.

Now install the wanted stuff:

apt-get install pystaticgallery

Windows install instructions

pystaticgallery does NOT work on versions of Windows before Windows 2000. This includes Windows ME, 98/95 and anything else that's not 2000 or XP. :)

Please make sure you have the required programs installed before trying to run pystaticgallery. You will need python, ImageMagick and jhead. If you don't have these please visit the website for links to the latest version of these programs and detailed instructions on getting pystaticgallery working under windows.

Note: These instructions are for Windows 2000. Windows XP will likely be similar but may not match exactly.

Changing the Environment: (or how your computer knows where programs are)

The PATH is a parameter that tells your computer where certain files live on your hard drive. By setting this parameter, you can simply type the name of a program at the command line and cause it to run. For example, if you open a command prompt and type notepad, the Windows Notepad program will start up.

In order for pystaticgallery to run, your computer needs to know where to find it.

  • Choose a directory to place pystaticgaller.py. I use C:bin.
  • Copy the pystaticgallery.py file from the pystaticgallery-X.x.tgz file (winzip should handle this without a problem) to the directory you chose above.
  • Start -> Settings -> Control Panel -> System (or hit Windows Key-Pause/Break)
  • Select Advanced tab
  • Select Environment Variables
  • In either User Variables or System Variables, select PATH.
  • Hit the Edit... button
  • In Variable Value, add the directory you chose above (for example, C:bin) to the end of the list. Separate it from the other directories with a semicolon (;). WARNING: Be careful to save the other directories that are listed there. If you delete them, hit Cancel and the start back at the Edit... instructions.
  • Hit OK (Closes the edit box)
  • Select New... in the User variables section (top half of window)
  • Fill in the box as follows: Variable Name: HOME Variable Value: C:Documents and Settingsname where name is the name you use to access your computer
  • Hit OK (Closes the edit box)
  • Hit OK (Closes the Environment Variables)
  • Hit OK (Closes the System Properties)

Testing the install:

  • Open a command prompt (Start -> Programs -> Accessories -> Command Prompt)
  • Type path. Look through the output and make sure the directory you just added is in the list.
  • Type pystaticgallery --help. The program should run and you should see all the options available to you.
  • Type exit to close the command prompt window. Note: When changing the PATH or installing programs, such as those below, that modify the PATH, you must open a new Command Prompt in order to see the changes. You do not need to reboot your machine.

Manual install instructions

There are some notes in the INSTALL file...

pystaticgallery usage:

Mostly you run the application from the image dir that you want to make an gallery for. But you can also give and path to image directory. That's useful for if you want to make an script to execute an bunch of different albums.

To get help:

pystaticgaller -h

Once the script is running, you see the progress, wait until done.

david@venus:~/pystaticgall/imgs$ pystaticgallery -it "Egypt 2006" -gd "Vacations of 2006 at Egypt."
Checking the command line options.
Creating the thumbs directory Creating the info directory Creating the slides directory Creating the slides directory Processing file 1 of 22 Creating the thumbnail image dscn0334.jpg Creating the slide image dscn0334.jpg Creating the info image dscn0334.jpg Generating the exif html info page for dscn0334.jpg Generating slide html file for dscn0334.jpg

Changelog

Version 0.0.5:

  • Changed the help information when use -h or --help flag.

Version 0.0.4:

  • Adding some more comments in the source and fixing some doc strings.

Version 0.0.3:

  • Add an check system to see if the python-htmltmp is been installed.

Version 0.0.2:

  • Adding an main function.

Version 0.0.1:

  • Initial start of the project.

 

Comments leaved by users (total: 0)
[ Add a comment ]
Add a comment
obfuscated letters
 
  • Do you know that you may use some special markup syntax to create header, italic, bold, styling and links and much more. See the sandbox for the markup language.
  • Do you need some other help?


[ Toggle on/off history ]

Item History

6 | 2008-12-13 06:41:33 | view diff
Initial


turbogears 2 has been released pyguicms1 will be migrated to pyguicms2 soon

2009-07-12 12:58:00

Turbogears 2 stable version has been released. Making our actual r00t and pyguicms project outdated. Work is ongoing to migrate the code to the new Turbogears 2 release. More

Renewed ssl certification

2009-05-20 09:29:00

The yearly ssl certificate has been renewed. More

Network unavailable on 14-02-2009 between 22:00 and 23:00

2009-02-14 16:02:00

The whole network could be unreachable for a few minutes caused by the ldap server migration at this specified moment. More

Network unavailable between 17-01-2009 21:00 and 23:00

2009-01-15 12:35:00

The whole network will be unavailable from outside and this for all services (webserver, ftp, vpn)! More

Servers will reboot

2008-11-03 11:19:00

The servers will be rebooted at 22:00. More

See all news items

Search form

User this form below to do a quick search.

Web   dvm.zapto.org

 

Disclaimer and privacy