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

Lukasz Badura 296615a0e1 feat: use vips instead of image_science to generate thumbnails to 3 months ago
bin 5847e639a6 feat: add organize command to distribute images in directories 4 months ago
lib 296615a0e1 feat: use vips instead of image_science to generate thumbnails to 3 months ago
sig b492b55d17 Initial commit 5 months ago
templates 483e376df9 fix: bring back photo log header 5 months ago
test 296615a0e1 feat: use vips instead of image_science to generate thumbnails to 3 months ago
.gitignore 6d6ae4d26e Add CLAUDE.MD to gitignore 4 months ago
Gemfile b492b55d17 Initial commit 5 months ago
LICENSE.txt b492b55d17 Initial commit 5 months ago
README.md f0e93a0771 Add a comment to install vips library 3 months ago
Rakefile 5353b546a9 feat: add heic images support to the organizer 3 months ago
fotos.gemspec 74d4ab2fbe chore: remove exifr dependancy and add ruby-vips instead 3 months 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 dependant libraries:

$ apt install libvips42

Install the gem locally:

$ bundle exec rake install

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

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.