A simple command-line static HTML image gallery generator with a TUI setup utility
Project description
README.md
simpleGals is trying to be a very simple command-line driven static HTML image
gallery generating tool. simpleGals just like to have fun, it doesn't want you
getting bogged down with all the tedious overhead associated with fancy gals,
running software that has to get patched, or paying another subscription.
simpleGals ain't like that.
simpleGals isn't for album management. You feed simpleGals directories of images and in return you get some simple HTML files with thumbnails.
Tech Stack
-
Python >= 3.10
-
term-image for terminal image rendering
-
A terminal emulator with any of the following:
- support for the Kitty graphics protocol
- support for the iTerm2 inline image protocol
- Unicode and direct-color (truecolor) support
-
bitmath for file size printing and math
(I told you, it's simple)
Experience
The fanciest part of simpleGals is the tui setup utility. Launching sgui opens
the application in the current working directory, sgui (and the batch-mode
simpleGals interface) will create a directory called out and expects to find
a directory called in, these directories will be created if they do not
already exist. Image metadata and caching files are saved in a .meta
directory.
A basic template ships with simpleGals. Your can fork this template and instruct
simpleGals to use your template instead with the --template,-t <TEMPLATE_DIR>
option flag, or in the setup panel of sgui.
sgui
The sgui launches with a scrollable file tree ('file panel') of discovered
images in the in directory listed on the left, just the file names, about 20%
of the screen up to a max width of ~=30 characters
- setting:
file_panel_width - desc: width in characters or percent of horizontal area
- types:
intfor absolute character value (e.g.,30= 30 characters)int%for max width percent (e.g.,30%= 30% of horizontal space)
- default:
30
Move the selection cursor with with the up/down arrow keys, pausing or stopping on a file name will marquee scroll the file name if it was truncated. The ctrl+n and ctrl+p shortcuts also work for next and previous if you are in the file panel.
- setting:
scroll_rate - desc: scroll rate in chars/second
- type:
float - default:
2.0
On the right using the remainder of the visible space is the general gallery settings input panel. This panel is also where previewing and editing properties of individual images takes place.
Pressing escape at any time shifts focus to the general gallery settings where parameters like max columns/rows/per page/description information can be provided. Press escape again to go back to the selection mode.
When moving the selection cursor between images in the file panel there is a
brief delay before the thumbnail is loaded the first time so you can page
through several in a row without attempting to generate thumbnails of each image
rapidly. Once a thumbnail is generated the delay is 0 if the last-modified
metadata has not changed for the input/thumbnail files
- setting:
preview_delay - description: delay before generating image metadata thumbnail the first time
- type:
int - default:
125ms
Image thumbnails are displayed in the console using the term-image library. A
preview will take up no more than 55% of the available horizontal/vertical space
on the panel on the right.
Pressing tab switches cursor focus between the file panel and the main usage window.
Settings
Settings are saved in JSON format.
Gallery metadata lives in .meta/. For each source image foo.jpg, the directory contains:
foo.jpg.json— sidecar JSON: records mtime, sha256, settings hash, and paths to generated artifactsfoo_thumb.jpg— cached thumbnail for thesguipreview panel
Staleness is determined by mtime first (fast), sha256 second (handles touched-but-unchanged files), then a settings hash to detect config changes. Artifact existence is also verified — if a sidecar exists but the output files are gone, they are regenerated. On each build, any .meta/ entries whose source image is no longer present in in/ are pruned, along with their corresponding out/ files.
Reference Material
- base library: https://github.com/AnonymouX47/term-image
- example usage: https://github.com/AnonymouX47/termvisage
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file simplegals-0.1.1.tar.gz.
File metadata
- Download URL: simplegals-0.1.1.tar.gz
- Upload date:
- Size: 1.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed29a2b96b9bf2428edb38f7708b3e3303a67870c75ec82daf98e4f39b500b0c
|
|
| MD5 |
d69932583da32682a5f948fcc9dde1da
|
|
| BLAKE2b-256 |
8dd3dbb55365f828f93b32e24985d2a22315f46576f298ff51db4d3080ff957b
|
Provenance
The following attestation bundles were made for simplegals-0.1.1.tar.gz:
Publisher:
publish.yml on timlnx/simpleGals
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
simplegals-0.1.1.tar.gz -
Subject digest:
ed29a2b96b9bf2428edb38f7708b3e3303a67870c75ec82daf98e4f39b500b0c - Sigstore transparency entry: 1386044313
- Sigstore integration time:
-
Permalink:
timlnx/simpleGals@319f181a2044d8c56b6e58905876e4295ce9c00c -
Branch / Tag:
refs/tags/0.1.1 - Owner: https://github.com/timlnx
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@319f181a2044d8c56b6e58905876e4295ce9c00c -
Trigger Event:
release
-
Statement type:
File details
Details for the file simplegals-0.1.1-py3-none-any.whl.
File metadata
- Download URL: simplegals-0.1.1-py3-none-any.whl
- Upload date:
- Size: 27.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
26efd6f5e22810f1b2674ea260e65822824bf9cee30f372914e1bcbdb8270307
|
|
| MD5 |
919a78f3c3debb39449182db862df26c
|
|
| BLAKE2b-256 |
37dff9b9636c2bbe875f570526d36e53b2d2e57e7d17f70e6ae6058340421874
|
Provenance
The following attestation bundles were made for simplegals-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on timlnx/simpleGals
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
simplegals-0.1.1-py3-none-any.whl -
Subject digest:
26efd6f5e22810f1b2674ea260e65822824bf9cee30f372914e1bcbdb8270307 - Sigstore transparency entry: 1386044400
- Sigstore integration time:
-
Permalink:
timlnx/simpleGals@319f181a2044d8c56b6e58905876e4295ce9c00c -
Branch / Tag:
refs/tags/0.1.1 - Owner: https://github.com/timlnx
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@319f181a2044d8c56b6e58905876e4295ce9c00c -
Trigger Event:
release
-
Statement type: