No description
- Rust 96.3%
- CSS 3.7%
| src | ||
| static | ||
| templates | ||
| tests/data/small-gallery | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| CHANGELOG.md | ||
| LICENSE.txt | ||
| README.md | ||
| rustfmt.toml | ||
| TODO.md | ||
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 animages-v2directory. No trailing slash needed.proxy_images_from: Local directory to load images from. If set,gallery_publish_basewill 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. Requiresgallery_publish_baseto have been set. This supports ETag to minimize traffic.gallery_dband 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
addressandportto 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.