Elbum is a web photo album generator. Example album at https://jerith666.github.io/elbum-demo/.
basic operation:
generate album data from a directory of pictures
- build and run
src/generator/gen-album.hs- give it two arguments:
- a source directory of pictures, each dir representing an album
- each album (except the root) must have a
thumbnailsymlink- thumbnails may point into subdirs
- albums can be nested
- each album (except the root) must have a
- a target directory
- a source directory of pictures, each dir representing an album
- it populates the target directory with:
- a directory of resized pictures
- an
album.jsonfile describing the structure and contents of the albums
- give it two arguments:
generate client code to display the album
- run
src/client/album-types-gen.hs:- it produces
Album.elm, client-side types and JSON en/decoders corresponding toAlbumTypes.hs
- it produces
- in
src/client, runelm-make Main.elm --output elbum.js:- the
index.htmlinsrc/clientloads the compiledelbum.jsand renders an album described byalbum.json
- the
- use
src/client/default.nixto do this.
use the Nix project's nix-shell with the provided shell.nix to automatically create a development environment with all the necessary tools available.
general approach inspired by http://bins.sautret.org/