Skip to main content

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

(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:
    • int for 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 artifacts
  • foo_thumb.jpg — cached thumbnail for the sgui preview 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simplegals-0.1.2.tar.gz (1.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simplegals-0.1.2-py3-none-any.whl (28.0 kB view details)

Uploaded Python 3

File details

Details for the file simplegals-0.1.2.tar.gz.

File metadata

  • Download URL: simplegals-0.1.2.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

Hashes for simplegals-0.1.2.tar.gz
Algorithm Hash digest
SHA256 4fe8eeadca6a50a7057c121eaed2bb1db5ca084592d05f5a0d6624ac9cf451a1
MD5 536f4db6d5dee61716a6e83af7102401
BLAKE2b-256 c41d0ee98ca1e61b03efabead1d7ee3ab0a30151f7a8abd41157747f0d1bd45e

See more details on using hashes here.

Provenance

The following attestation bundles were made for simplegals-0.1.2.tar.gz:

Publisher: publish.yml on timlnx/simpleGals

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file simplegals-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: simplegals-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 28.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for simplegals-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b123620a7e02b604b9730ca97f56bedac1e47807d2e279242ddcae2fa077cd6d
MD5 cba4e6f9cf33da6ffe0984ed5d6bad67
BLAKE2b-256 298167877a08e311129c7844817a6d4c0c78853a0fecab53cb9f85d5c85b43e0

See more details on using hashes here.

Provenance

The following attestation bundles were made for simplegals-0.1.2-py3-none-any.whl:

Publisher: publish.yml on timlnx/simpleGals

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page