mpp.py (make-photo-pages)

mpp.py is a free python program that generates static web albums (HTML) based on Google Picasa's export to XML feature or from a directory of pictures. It's 100% template based and supports i18n, exif and other features common on software of this type.

download | documentation | examples | contact

It was created due to a personal need: even on this flickr era, I like to keep my pictures on my personal website and it was a nightmare to sync my local repository with the web. I tried several approaches and different softwares for more than two years, but none worked well or scaled enough on my scenario:

  • Static pages (no sql, no php, no cgi)
  • Templates based
  • Support multi-language albums (i18n)
  • Support image captions
  • Support descriptions on albums (arbitrary text/html)
  • Support (show) EXIF information
  • Import pictures from a local directory
  • Import pictures from Google Picasa(TM)
  • Open Source
  • Simple, fast, etc... :-)

Download

The latest official release is v1.2. You may prefer to get the latest version from the git repository (it's usually in good shape). Your options are:

You may find it interesting to take a look at the albums.ini example as well.

Software requirements:

Please contact the author if you have any questions, bug-reports or contributions.

Examples of albums

The look-and-feel of the albums is 100% dependent of the template used. I'm not a good web designer, but so far the best examples are my personal albums. Here are some of my favorites:

Some examples using the standard (default) template:

If you're using this software and would like to share your albums with the world, please let me know and I'll add a link here.

Documentation

Using it is quite simple: all you have to do is create a .ini file with information about the albums (see below) and run mpp.py inside your albums root directory (no installation required).

Step by step guide (using Google Picasa)

  1. If you're using Google Picasa, export your pictures as an html album and choose the XML format;
  2. Create a .ini file with information about the albums (examples below);
  3. Run mpp.py on the albums root directory (destination). mpp.py will create the album directories, thumbnails, rescale pictures, extract exif information, etc;
  4. If you want, edit on each albums the files captions.txt (image captions) and html-description.txt (html text added on the album main page);
  5. Run mpp.py again at any time if you've made any modifications on the config file, .txt files or if you deleted/added pictures. You can use --local if don't want to reimport the files;
  6. See --help for more command line options.

Some highlights:

  • When importing data from Google Picasa's XML, mpp.py merges image captions imported with the ones written by hand (via captions.txt);
  • mpp.py avoids rescaling pictures if they're already of the correct size;
  • By default mpp.py creates a bkp/ directory inside every album before overwriting files;
  • Implementing or changing a template is trivial. All you have to do is insert text variables inside the html code and mpp.py will replace them with the real information. See mpp-templates/README for more details.

You may be interested in a complete albums.ini example, including comments on each option, but a minimal yet full-featured .ini example is below:

[global]
albums = dot, curitiba
embedded_label = "http://www.mydomain.com/"

[dot]
title = "Pictures from dot, my little cat"
title2 = Dot
period = December 2006 - present day
from_dir = /home/ademar/picasa-exports/album-dot

[curitiba]
extra_langs = pt_BR
title = "Pictures from Curitiba - Paraná - Brazil"
title2 = "Curitiba - Paraná - Brazil"
title.pt_BR = "Fotos de Curitiba - Paraná"
title2.pt_BR = "Curitiba - Paraná"
from_dir = /home/ademar/pictures/album-curitiba

See also: