1
2
Fork
You've already forked rocket-gallery
0
Just a simple dynamic gallery application
  • Rust 63.8%
  • JavaScript 28.8%
  • HTML 7.4%
Find a file
2025年11月13日 21:40:34 +01:00
.idea Add image tags to Json output of API 2025年06月02日 11:27:21 +02:00
package Add config option for number of database connections 2025年06月23日 19:58:52 +02:00
src Convert OsStr of filename to a displayable string first to avoid failing on non UTF-8 filenames 2025年11月13日 21:40:34 +01:00
static Add keybindings for fullscreen view 2025年06月19日 11:16:25 +02:00
.gitignore Add Cargo.lock 2025年06月08日 10:47:35 +02:00
Cargo.lock Convert OsStr of filename to a displayable string first to avoid failing on non UTF-8 filenames 2025年11月13日 21:40:34 +01:00
Cargo.toml Convert OsStr of filename to a displayable string first to avoid failing on non UTF-8 filenames 2025年11月13日 21:40:34 +01:00
README.md Add config option for number of database connections 2025年06月23日 19:58:52 +02:00

Simple Rocket Gallery

A simple dynamic web application that generates a gallery view out of a folder.

Images in sub folders are assigned a tag with the name of the parenting folder. For example an image with the relative path of maid/twitter/123456789.jpg will get the tags maid and twitter.

Usage

Images can be shown full screen by clicking on them. Esc closes the full screen view. LeftArray and RightArrow allow to navigate through pictures in fullscreen view.

Components

Two components make up this application.

  1. Server side API implemented with rocket
  2. Client side frontend using JavaScript

Setup

Configuration

Configuration is done via the Rocket.toml file located in the current execution directory. Location can be specified by setting ROCKET_CONFIG environment variable.

Example config

[default]
image_path = "../../Pictures/"
assets_path = "./static/"
extensions = ["png", "jpg", "jpeg", "webp"]
db_url = "image_cache.sqlite"
url_prefix = "http://localhost:8076"
port = 8076
adress = "127.0.0.1"
connections = 128

Rocket Gallery specific configuration options:

  • image_path is the folder with your images
  • assets_path: path where index.html and gallery.js are located
  • extensions: the file extensions to interpret as images (any file-type supported by the image crate is supported)
  • db_url: location of the sqlite database
  • url_prefix: this should be the URL where your application is exposed to the user. Useful, if you're running it behind a reverse proxy like nginx.
  • connections: number of database connections to open

Package Manager

An Arch Linux PKGBUILD is available here: MaidLucy/rocket-gallery-PKGBUILD

Packages for Arch Linux are available on the releases page.

From Source

  1. Clone the repository
  2. Compile
cargo run --release

Credits