simple_gallery

Generate simple, static HTML/CSS gallery
Log | Files | Refs | README

README.md (2111B)


      1 simple gallery
      2 ==============
      3 
      4 > Generate a static multi-album image gallery HTML/CSS site from a JSON description.
      5 
      6 Requirements
      7 ------------
      8 
      9  - [exiftool](https://exiftool.org/) is needed for the extraction of metadata from photos.
     10  - [mogrify from ImageMagick](https://imagemagick.org/script/mogrify.php) is needed for the generation of thumbnails.
     11  - python3 and [jinja](https://jinja.palletsprojects.com/) for the generation of the HTML.
     12 
     13 Example Usage
     14 -------------
     15 
     16     ./gallery_builder.sh <input_image_folder> <albums.json> <output_folder>
     17 
     18 This invokes the scripts extract\_metadata.sh, gen\_thumbs.sh and jinjarender.py. These scripts can also be invoked manually, which could be useful for correcting errors in the EXIF metadata, by editing output\_folder/img/metadata/\*.csv before generating HTML using jinjarender.py.
     19 
     20 Note that images in the input folder are not modified, instead are copied to the output folder.
     21 The script assumes that every image in the input JSON exists, so make sure every image in the JSON album actually exists in the input image folder.
     22 
     23 The albums.json is simply a JSON file with the following structure:
     24 
     25     [
     26         {
     27         "name": "Album 1",
     28         "imgs": [
     29             "photo1.jpg",
     30             "photo2.jpg"
     31             "photo3.jpg"
     32             "photo4.jpg"
     33             ...
     34             ]
     35         },
     36         {
     37         "name": "Another Photo Album",
     38         "imgs": [
     39             "photo2.jpg"
     40             ...
     41             ]
     42         },
     43         ...
     44     ]
     45 
     46 An image can exist in multiple albums and is only stored once. There are however multiple pages for the same image to preserve the album structure.
     47 
     48 
     49 Images, Thumbnails & Metadata
     50 -----------------------------
     51 
     52 Source images are copied to the destination with metadata stripped to only include date, camera settings, camera model, lens model, artist and copyright information.
     53 Metadata is also written in csv format to the folder img/metadata. This can be deleted after running ```gallery_builder.sh```.
     54 Thumbnails are 70% jpeg quality 1/8 resolution of the original, while previews are 80% 1/2 resolution.