Media gallery generator. Supports desktop and mobile layouts. No JavaScript.
pip install -r requirements.txt
(optionally, create a virtual environment)- Copy
EXAMPLE-CONFIG.toml
togallery.toml
in each gallery directory. - Copy
EXAMPLE-CONFIG.toml
toalbum.toml
in each album directory. - Edit the configuration as desired.
python generate_gallery.py GALLERY_DIRECTORY [GALLERY_DIRECTORY]...
- Any gallery directories missing
gallery.toml
will not be processed. - Any album directories missing
album.toml
will not be processed. - All settings are optional.
- Settings specified in
gallery.toml
will be used as default values if unspecified inalbum.toml
. - Captions are pulled from the first specified value in:
Xmp.dc.title
Xmp.acdsee.caption
Iptc.Application2.ObjectName
- Locations are pulled from the first specified value in:
Exif.Image.ImageDescription
Iptc.Application2.Caption
Xmp.acdsee.notes
Xmp.dc.description
Xmp.exif.UserComment
Xmp.tiff.ImageDescription
- If a location is not specified, GPS coordinates are present, and
strip_gps_data
isFalse
, a DuckDuckGo Maps link will be provided to the GPS coordinates. - For video files: The caption, location, GPS data, and orientation are pulled
from the XMP sidecar file
FILENAME.xmp
.
/path/to/media/
album1/
album.toml
image.jpg
video.mov
video.mov.xmp
album2/
album.toml
image.png
video.mp4
video.mp4.xmp
gallery.toml
/path/to/media/
gallery/
album1/
thumbnails/
image.jpg
video.jpg
image.jpg
index.html
video.mov
album2/
thumbnails/
image.jpg
video.jpg
image.png
index.html
video.mp4
index.html