No description
  • Rust 96.3%
  • CSS 3.7%
Find a file
2025-10-27 09:52:45 -04:00
src Fix doc lint 2024-11-29 12:42:48 -05:00
static Fix content-signals block -- include Allow: / 2025-10-27 09:09:33 -04:00
templates Update Creative Commons license to 4,0 2024-11-29 13:09:05 -05:00
tests/data/small-gallery Pass config file as arg; relative paths in config; start integration tests 2024-11-03 11:15:43 -05:00
.gitignore Minimal stats page with hardcoded DB path, etc. 2024-10-09 18:41:03 -04:00
Cargo.lock Update version string (oops) and cut release 2025-10-27 09:52:45 -04:00
Cargo.toml Update version string (oops) and cut release 2025-10-27 09:52:45 -04:00
CHANGELOG.md Update version string (oops) and cut release 2025-10-27 09:52:45 -04:00
LICENSE.txt Fill out metadata; set license (AGPL) 2024-10-22 05:32:26 -04:00
README.md Add --check-and-exit to allow validating a config without launching 2024-11-29 12:42:44 -05:00
rustfmt.toml Let rustfmt know the edition too (fix emacs integration) 2024-10-26 19:18:00 -04:00
TODO.md Rocket fixed percent-encode docs 2024-12-02 07:06:12 -05:00

Pellucida (in Rust)

A photo gallery website fed by kpawebgen, written in Rust. (Rewritten from a Clojure version.)

Requires a kpawebgen gallery DB version 2.

Usage

Run:

pellucida ~/www/config.toml

Config file example:

[default]

gallery_db = "/home/user/www/pellucida/gallery.db3"
site_base_url = "https://gallery.example.net"
gallery_publish_base = "https://s3.amazonaws.com/my-kpawebgen-gallery"

Required configuration fields:

  • gallery_db: Path to SQLite database file generated by kpawebgen. Can be relative to config file's directory.
  • site_base_url: Base URL of this site. No trailing slash needed.
  • One or both of:
    • gallery_publish_base: Base URL where kpawebgen gallery has been published, containing at minimum an images-v2 directory. No trailing slash needed.
    • proxy_images_from: Local directory to load images from. If set, gallery_publish_base will be ignored and the built-in proxying URL will be used in image links and embeds instead. Can be relative to config file's directory.

Optional fields:

  • update_gallery_db (bool): If set to true, enable a route that updates the gallery database from the same place the images have been published to. Requires gallery_publish_base to have been set. This supports ETag to minimize traffic. gallery_db and the parent directory will need to be writable (as additional files will need to be created with additional suffixes, e.g. gallery.db3-alt).
  • update_min_interval_secs (int): Require an interval of at least this many seconds between update attempts. May not be exact.
  • contact_email: Email address to display in contact box in sidebar, or elsewhere.
  • google_static_maps_v2_api_key_browser: Google Static Maps API key (API v2, for browser)
  • Rocket configuration fields, including address and port to bind webserver to.

Pass --check-and-exit on the command line to just validate the configuration and exit (with appropriate error code).

Build

cargo build --release
tar -czf pellucida.tgz static templates -C target/release pellucida

Must be run as ./pellucida as the binary will expect to find static and templates in the current working directory.

License

Copyright 2024 Tim McCormack, licensed under the AGPL v3 or later.

Note that src/vendor/ contains code with different copyright and license.