A ruby gem to quickly generate static HTML photo gallery pages.

Lukasz Badura 3668dc1c92 Update README with dependencies 2 weeks ago
bin 5847e639a6 feat: add organize command to distribute images in directories 1 year ago
lib bed75b1c22 chore: generator tests 1 year ago
sig b492b55d17 Initial commit 1 year ago
templates 483e376df9 fix: bring back photo log header 1 year ago
test bed75b1c22 chore: generator tests 1 year ago
.gitignore 6d6ae4d26e Add CLAUDE.MD to gitignore 1 year ago
Gemfile b492b55d17 Initial commit 1 year ago
LICENSE.txt b492b55d17 Initial commit 1 year ago
README.md 3668dc1c92 Update README with dependencies 2 weeks ago
Rakefile b492b55d17 Initial commit 1 year ago
fotos.gemspec e43da653d5 WIP: move zip extract logic from script to gem 1 year ago

README.md

Fotos

A Ruby gem for creating static HTML photo galleries from organized image directories. Fotos extracts EXIF data, generates thumbnails, and creates date-organized HTML galleries.

Installation

Install the gem locally:

$ bundle exec rake install

gem 'fotos', git: 'https://src.niebo.net/lukasz/fotos.git'

Dependancies

This gem depends on the Freeimage library. On Mac: brew install freeimage

Usage

Fotos provides three main commands for processing images:

Extract Images from ZIP Files

$ fotos extract -z PATH_TO_ZIP [-d DESTINATION]

Extracts images from a ZIP archive to a destination directory (defaults to current directory).

Organize Images by Date

$ fotos organize -s SOURCE_DIR -d DESTINATION_DIR

Reads EXIF data from images and organizes them into date-named directories (DD-MM-YYYY format). Only supports JPEG/JPG files currently.

Generate HTML Gallery

$ fotos build -s SOURCE_DIR [-d OUTPUT_DIR] [-t]

Creates an HTML photo gallery from organized image directories:

  • -s specifies the source directory containing date-organized subdirectories
  • -d specifies the output directory (defaults to current directory)
  • -t automatically generates missing thumbnails

The gallery includes:

  • Date-based organization with Polish month names
  • Thumbnail navigation

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake test to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and the created tag, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/lbadura/fotos.

License

The gem is available as open source under the terms of the MIT License.