Skip to content

finnbear/chillphoto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chillphoto

Static photo gallery website generator

Installation

cargo install --git https://github.com/finnbear/chillphoto

Usage

Sub-commands

chillphoto init     # initialize top-level config
chillphoto serve    # preview the gallery
chillphoto build    # generate the gallery

ollama pull llava   # install dependency
chillphoto image-ai # AI-generate photo descriptions based on thumbnails

Directory Structure

/gallery
  chillphoto.toml           # top-level config
  favicon.png               # favicon
  head.html                 # HTML to include in <head>
  About.{txt,md,html}       # page, linked on sidebar
  About.toml                # page config
  Category 2.{txt,md,html}  # category caption
  /Category 1               # category
    Photo1.{jpg,png}        # photo (w/ EXIF)
    Photo1.toml             # photo config
    Photo1.{txt,md,html}    # photo caption
  Category 1.toml           # category config
  /Category 2               # category
    Photo3.JPG              # photo (w/ EXIF)

Category config

description = "..."
# higher -> first
# -2, -1, 0, 1, 2, etc.
order = 0
thumbnail = "Photo1"

Photo config

# optional alt text
description = "..."
# optional
location = "..."
# optional override
author = "Full Name"
# optional override
license_url = "https://creativecommons.org/licenses/by-sa/4.0/deed.en"
# higher -> first
# -2, -1, 0, 1, 2, etc.
order = 0
# higher -> zoomed in more
# 1.0+
thumbnail_crop_factor = 1.0
# center of crop square
thumbnail_crop_center = {
    # 0.0 - 1.0
    x = 0.5,
    # 0.0 - 1.0
    y = 0.5
}

Page config

description = "..."
# higher -> first
# -2, -1, 0, 1, 2, etc.
order = 0

Features

  • Instantly preview gallery via embedded server
  • Generate a completely static gallery website
  • Full, preview, and thumbnail sizes
  • Arbitrarily-nested photo categories
  • Arbitrary plain-text, Markdown, or HTML pages and captions
  • Input essential EXIF metadata
  • Output HTML, Sitemap, structured data, and Open Graph metadata
  • AI photo descriptions
  • Pagination
  • Hot-reloading
  • Diagnostics and error handling
  • Support for themes
  • Pages within categories
  • Archive page organized by date
  • Optional comment support (via a 3rd party comment form)
  • RSS feed
  • Optional visual editor

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.