- Python 57.3%
- HTML 31.1%
- CSS 8.3%
- Nix 3.3%
| albums | ||
| themes/default | ||
| .envrc | ||
| .gitignore | ||
| generate.py | ||
| README.md | ||
| shell.nix | ||
Simple static-html gallery generator
Take a folder of images and turn them into a simple and static image gallery to host on the web.
Instruction
The input folder with your images is expected to have the following structure:
inputfolder/
album_name_1/
image1.jpg
image2.jpg
album_name_2/
image1.jpg
image2.jpg
The tool needs the following Pyhton libraries:
- Matplotlib
- Pillow
- Jinja2
The ./generate.py command accepts a few arguments:
--source
Default: ./albums
The path to your original images. This path will not get modified and is only used as a source.
--destination
Default: ./www
The output pfad. This path will be generated if it not exists, and it will be deleted if it exists!
--theme
Default: default
The theme folder that is selected from the themes/ directory.
--thumbnails
Default: true
If you want to generate thumbnails.
Themes
If you want to create a new theme, you need to create a new folder in the themes/ directory, with the name of your theme. The folder is required to have a index.html and gallery.html which both get rendered as Jinja2 templates. The optional assets/ folder in your theme directory will be extracted to the toplevel of the output folder.