simplegals 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- simplegals-0.1.0/.claude/settings.local.json +43 -0
- simplegals-0.1.0/.github/workflows/ci.yml +38 -0
- simplegals-0.1.0/.gitignore +148 -0
- simplegals-0.1.0/.readthedocs.yaml +16 -0
- simplegals-0.1.0/.remember/.gitignore +1 -0
- simplegals-0.1.0/.remember/archive.md +3 -0
- simplegals-0.1.0/.remember/now.md +13 -0
- simplegals-0.1.0/.remember/recent.md +8 -0
- simplegals-0.1.0/.remember/tmp/last-ndc.ts +1 -0
- simplegals-0.1.0/.remember/tmp/last-save-ts +1 -0
- simplegals-0.1.0/.remember/tmp/last-save.json +1 -0
- simplegals-0.1.0/.remember/tmp/save-session.pid +1 -0
- simplegals-0.1.0/.remember/today-2026-04-25.md +4 -0
- simplegals-0.1.0/.remember/today-2026-04-26.done.md +11 -0
- simplegals-0.1.0/CLAUDE.md +32 -0
- simplegals-0.1.0/Makefile +20 -0
- simplegals-0.1.0/PKG-INFO +139 -0
- simplegals-0.1.0/README.md +101 -0
- simplegals-0.1.0/docs/Makefile +16 -0
- simplegals-0.1.0/docs/conf.py +20 -0
- simplegals-0.1.0/docs/index.md +16 -0
- simplegals-0.1.0/docs/installation.md +25 -0
- simplegals-0.1.0/docs/make.bat +29 -0
- simplegals-0.1.0/docs/superpowers/plans/2026-04-25-core-cli.md +2039 -0
- simplegals-0.1.0/docs/superpowers/plans/2026-04-25-sgui-tui.md +1504 -0
- simplegals-0.1.0/docs/superpowers/specs/2026-04-25-architecture-design.md +369 -0
- simplegals-0.1.0/pyproject.toml +60 -0
- simplegals-0.1.0/simplegals/__init__.py +1 -0
- simplegals-0.1.0/simplegals/cli.py +112 -0
- simplegals-0.1.0/simplegals/core/__init__.py +0 -0
- simplegals-0.1.0/simplegals/core/config.py +89 -0
- simplegals-0.1.0/simplegals/core/gallery.py +226 -0
- simplegals-0.1.0/simplegals/core/metadata.py +108 -0
- simplegals-0.1.0/simplegals/core/processor.py +77 -0
- simplegals-0.1.0/simplegals/core/template.py +99 -0
- simplegals-0.1.0/simplegals/template/item.html.j2 +45 -0
- simplegals-0.1.0/simplegals/template/page.html.j2 +53 -0
- simplegals-0.1.0/simplegals/template/style.css +97 -0
- simplegals-0.1.0/simplegals/tui/__init__.py +38 -0
- simplegals-0.1.0/simplegals/tui/__main__.py +3 -0
- simplegals-0.1.0/simplegals/tui/app.py +347 -0
- simplegals-0.1.0/simplegals/tui/file_panel.py +147 -0
- simplegals-0.1.0/simplegals/tui/preview_panel.py +260 -0
- simplegals-0.1.0/simplegals/tui/progress_bar.py +49 -0
- simplegals-0.1.0/simplegals/tui/state.py +94 -0
- simplegals-0.1.0/simplegals/workers/__init__.py +0 -0
- simplegals-0.1.0/simplegals/workers/pool.py +58 -0
- simplegals-0.1.0/simplegals/workers/progress.py +73 -0
- simplegals-0.1.0/tests/__init__.py +0 -0
- simplegals-0.1.0/tests/assets/.gitkeep +0 -0
- simplegals-0.1.0/tests/assets/TEST.jpg +0 -0
- simplegals-0.1.0/tests/assets/TEST.png +0 -0
- simplegals-0.1.0/tests/conftest.py +35 -0
- simplegals-0.1.0/tests/test_cli.py +61 -0
- simplegals-0.1.0/tests/test_config.py +89 -0
- simplegals-0.1.0/tests/test_gallery.py +133 -0
- simplegals-0.1.0/tests/test_metadata.py +152 -0
- simplegals-0.1.0/tests/test_processor.py +72 -0
- simplegals-0.1.0/tests/test_template.py +138 -0
- simplegals-0.1.0/tests/test_tui_state.py +112 -0
- simplegals-0.1.0/tests/test_tui_widgets.py +772 -0
- simplegals-0.1.0/tests/test_workers.py +48 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"Bash(git -C /Users/tbielawa/Projects/simpleGals log --oneline -10)",
|
|
5
|
+
"Bash(pip install *)",
|
|
6
|
+
"Bash(python -c \"import simplegals; print\\(simplegals.__version__\\)\")",
|
|
7
|
+
"Read(//usr/local/bin/**)",
|
|
8
|
+
"Read(//opt/homebrew/bin/**)",
|
|
9
|
+
"Bash(pyenv versions *)",
|
|
10
|
+
"Bash(python3.12 -m pip install -e \".[dev]\" -q)",
|
|
11
|
+
"Bash(python3.12 -c \"import simplegals; print\\(simplegals.__version__\\)\")",
|
|
12
|
+
"Bash(python3.12 -m venv /Users/tbielawa/Projects/simpleGals/.venv)",
|
|
13
|
+
"Bash(/Users/tbielawa/Projects/simpleGals/.venv/bin/pip install *)",
|
|
14
|
+
"Bash(.venv/bin/pytest *)",
|
|
15
|
+
"Bash(rm -rf /tmp/sg-smoke)",
|
|
16
|
+
"Bash(mkdir /tmp/sg-smoke)",
|
|
17
|
+
"Bash(cp /Users/tbielawa/Projects/simpleGals/tests/assets/TEST.jpg /tmp/sg-smoke/)",
|
|
18
|
+
"Read(//tmp/**)",
|
|
19
|
+
"Bash(/Users/tbielawa/Projects/simpleGals/.venv/bin/python -m simplegals.cli init)",
|
|
20
|
+
"mcp__plugin_context7_context7__resolve-library-id",
|
|
21
|
+
"mcp__plugin_context7_context7__query-docs",
|
|
22
|
+
"Bash(.venv/bin/python3 *)",
|
|
23
|
+
"Bash(git -C /Users/tbielawa/Projects/simpleGals log --oneline -3)",
|
|
24
|
+
"Bash(git -C /Users/tbielawa/Projects/simpleGals status --short)",
|
|
25
|
+
"Bash(.venv/bin/python *)",
|
|
26
|
+
"Bash(.venv/bin/pip install *)",
|
|
27
|
+
"Bash(.venv/bin/sgui *)",
|
|
28
|
+
"mcp__plugin_oh-my-claudecode_t__lsp_diagnostics",
|
|
29
|
+
"Read(//Users/tbielawa/Projects/nugals/nugalsenv/lib/**)",
|
|
30
|
+
"Bash(python3 -c \"import term_image; print\\(term_image.__version__\\)\")",
|
|
31
|
+
"Bash(pip show *)",
|
|
32
|
+
"Bash(python3 -c \"from term_image.image import AutoImage; help\\(AutoImage.__init__\\)\")",
|
|
33
|
+
"Bash(python3 -c ' *)",
|
|
34
|
+
"WebFetch(domain:bitmath.readthedocs.io)",
|
|
35
|
+
"Bash(python3 -c \"import bitmath; help\\(bitmath.getsize\\)\")",
|
|
36
|
+
"Bash(python3 -c \"import bitmath; help\\(bitmath.get_size\\)\")",
|
|
37
|
+
"Bash(python3 *)",
|
|
38
|
+
"Bash(python -m pytest tests/ -x -q)",
|
|
39
|
+
"Bash(/Users/tbielawa/Projects/simpleGals/.venv/bin/pytest tests/ -x -q)",
|
|
40
|
+
"Bash(/Users/tbielawa/Projects/simpleGals/.venv/bin/pytest tests/test_gallery.py::test_build_force_rebuilds_all -v -s)"
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on: [push, pull_request]
|
|
4
|
+
|
|
5
|
+
# NOTE: bitmath is installed from PyPI (bitmath>=2.0.0) in CI.
|
|
6
|
+
# During local prototyping it installs from a local path — see pyproject.toml.
|
|
7
|
+
# Do not push to GitHub until bitmath 2.0.0 is published to PyPI and
|
|
8
|
+
# pyproject.toml has been updated to the official release.
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
test:
|
|
12
|
+
runs-on: ${{ matrix.os }}
|
|
13
|
+
strategy:
|
|
14
|
+
fail-fast: false
|
|
15
|
+
matrix:
|
|
16
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
17
|
+
python-version: ["3.12", "3.13"]
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
- uses: actions/setup-python@v5
|
|
21
|
+
with:
|
|
22
|
+
python-version: ${{ matrix.python-version }}
|
|
23
|
+
- name: Install package and dev dependencies
|
|
24
|
+
run: pip install -e ".[dev]"
|
|
25
|
+
- name: Run tests
|
|
26
|
+
run: pytest tests/ --cov=simplegals --cov-report=term-missing
|
|
27
|
+
|
|
28
|
+
docs:
|
|
29
|
+
runs-on: ubuntu-latest
|
|
30
|
+
steps:
|
|
31
|
+
- uses: actions/checkout@v4
|
|
32
|
+
- uses: actions/setup-python@v5
|
|
33
|
+
with:
|
|
34
|
+
python-version: "3.12"
|
|
35
|
+
- name: Install package and docs dependencies
|
|
36
|
+
run: pip install -e ".[docs]"
|
|
37
|
+
- name: Build docs
|
|
38
|
+
run: cd docs && make html
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.so
|
|
6
|
+
*.egg
|
|
7
|
+
*.egg-info/
|
|
8
|
+
dist/
|
|
9
|
+
build/
|
|
10
|
+
eggs/
|
|
11
|
+
parts/
|
|
12
|
+
var/
|
|
13
|
+
sdist/
|
|
14
|
+
wheels/
|
|
15
|
+
pip-wheel-metadata/
|
|
16
|
+
share/python-wheels/
|
|
17
|
+
MANIFEST
|
|
18
|
+
.installed.cfg
|
|
19
|
+
|
|
20
|
+
# Virtual environments
|
|
21
|
+
.venv/
|
|
22
|
+
venv/
|
|
23
|
+
env/
|
|
24
|
+
ENV/
|
|
25
|
+
.env
|
|
26
|
+
|
|
27
|
+
# Distribution / packaging
|
|
28
|
+
.Python
|
|
29
|
+
pip-log.txt
|
|
30
|
+
pip-delete-this-directory.txt
|
|
31
|
+
htmlcov/
|
|
32
|
+
.tox/
|
|
33
|
+
.nox/
|
|
34
|
+
.coverage
|
|
35
|
+
.coverage.*
|
|
36
|
+
.cache
|
|
37
|
+
nosetests.xml
|
|
38
|
+
coverage.xml
|
|
39
|
+
*.cover
|
|
40
|
+
*.py,cover
|
|
41
|
+
.hypothesis/
|
|
42
|
+
.pytest_cache/
|
|
43
|
+
pytestdebug.log
|
|
44
|
+
|
|
45
|
+
# Type checkers
|
|
46
|
+
.mypy_cache/
|
|
47
|
+
.dmypy.json
|
|
48
|
+
dmypy.json
|
|
49
|
+
.pytype/
|
|
50
|
+
.pyre/
|
|
51
|
+
|
|
52
|
+
# Linters / formatters
|
|
53
|
+
.ruff_cache/
|
|
54
|
+
|
|
55
|
+
# Jupyter
|
|
56
|
+
.ipynb_checkpoints
|
|
57
|
+
*.ipynb
|
|
58
|
+
|
|
59
|
+
# pyenv
|
|
60
|
+
.python-version
|
|
61
|
+
|
|
62
|
+
# uv
|
|
63
|
+
.uv/
|
|
64
|
+
uv.lock
|
|
65
|
+
|
|
66
|
+
# PDM
|
|
67
|
+
.pdm.toml
|
|
68
|
+
.pdm-python
|
|
69
|
+
__pypackages__/
|
|
70
|
+
|
|
71
|
+
# Hatch
|
|
72
|
+
.hatch/
|
|
73
|
+
|
|
74
|
+
# Celery
|
|
75
|
+
celerybeat-schedule
|
|
76
|
+
celerybeat.pid
|
|
77
|
+
|
|
78
|
+
# SageMath
|
|
79
|
+
*.sage.py
|
|
80
|
+
|
|
81
|
+
# Spyder
|
|
82
|
+
.spyderproject.db
|
|
83
|
+
.spyproject
|
|
84
|
+
|
|
85
|
+
# Rope
|
|
86
|
+
.ropeproject
|
|
87
|
+
|
|
88
|
+
# mkdocs
|
|
89
|
+
/site
|
|
90
|
+
|
|
91
|
+
# Editor trash
|
|
92
|
+
*~
|
|
93
|
+
*.swp
|
|
94
|
+
*.swo
|
|
95
|
+
*.swn
|
|
96
|
+
*.bak
|
|
97
|
+
*.orig
|
|
98
|
+
.DS_Store
|
|
99
|
+
Thumbs.db
|
|
100
|
+
|
|
101
|
+
# VS Code
|
|
102
|
+
.vscode/
|
|
103
|
+
*.code-workspace
|
|
104
|
+
|
|
105
|
+
# JetBrains (PyCharm, IDEA, etc.)
|
|
106
|
+
.idea/
|
|
107
|
+
*.iml
|
|
108
|
+
*.iws
|
|
109
|
+
*.ipr
|
|
110
|
+
|
|
111
|
+
# Vim
|
|
112
|
+
[._]*.s[a-v][a-z]
|
|
113
|
+
[._]*.sw[a-p]
|
|
114
|
+
[._]s[a-rt-v][a-z]
|
|
115
|
+
[._]ss[a-gi-z]
|
|
116
|
+
[._]sw[a-p]
|
|
117
|
+
Session.vim
|
|
118
|
+
.netrwhist
|
|
119
|
+
tags
|
|
120
|
+
[._]*.un~
|
|
121
|
+
|
|
122
|
+
# Emacs
|
|
123
|
+
\#*\#
|
|
124
|
+
/.emacs.desktop
|
|
125
|
+
/.emacs.desktop.lock
|
|
126
|
+
*.elc
|
|
127
|
+
auto-save-list
|
|
128
|
+
tramp
|
|
129
|
+
.\#*
|
|
130
|
+
|
|
131
|
+
# Logs
|
|
132
|
+
*.log
|
|
133
|
+
logs/
|
|
134
|
+
|
|
135
|
+
# Secrets / local config
|
|
136
|
+
.env.local
|
|
137
|
+
.env.*.local
|
|
138
|
+
*.pem
|
|
139
|
+
*.key
|
|
140
|
+
secrets.toml
|
|
141
|
+
|
|
142
|
+
# Project-specific
|
|
143
|
+
in/
|
|
144
|
+
out/
|
|
145
|
+
.meta/
|
|
146
|
+
|
|
147
|
+
# oh-my-claudecode internal state
|
|
148
|
+
.omc/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
*
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
|
|
2
|
+
## 04:01 | main
|
|
3
|
+
Fixed TUI bugs in app.py/preview_panel.py + added dirty indicator, Tab cycling, centered preview, bitmath sizes, ctrl+c quit w/ save prompt, ctrl+w write.
|
|
4
|
+
## 04:11 | main
|
|
5
|
+
Fixed simpleGals rebuild bug: metadata.py check_staleness now verifies thumb/output files exist on disk, not just sidecar mtime/sha; updated test_metadata.py (140/140 tests passing).
|
|
6
|
+
## 04:14 | main
|
|
7
|
+
Fixed prev link (page 2→index.html) in page.html.j2, linked item imgs to fullsize, added 💾 dl link to meta in item.html.j2; 142/142 tests.
|
|
8
|
+
## 04:21 | main
|
|
9
|
+
Added --force flag to build cmd for forced out/ rebuild, restored CLI progress bars w/ _on_progress callback in gallery.py/cli.py, updated test_gallery.py; tests passing.
|
|
10
|
+
## 04:28 | main
|
|
11
|
+
Fixed --force test, 144/144 passing; discovered: deleted in/ imgs don't clean orphan out/ files (DSC_8297.jpg leaves _item.html).
|
|
12
|
+
## 04:40 | main
|
|
13
|
+
Impl `prune_removed_sources()` fn to clean orphans (.meta, thumbs, out/ imgs, item pages) on src deletion; 145/145 pass; 626c080.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Recent
|
|
2
|
+
|
|
3
|
+
```
|
|
4
|
+
|
|
5
|
+
# Recent
|
|
6
|
+
|
|
7
|
+
## 2026-04-26
|
|
8
|
+
Completed Plan 1 scaffold (53 core+CLI tests) with 6 TUI features, fixed staging↔widget dataflow, updated deps (bitmath 2.0.0, term-image). Pushed repo live; fixed 4 additional TUI bugs (quit key, preview API, mode-focus) reaching 103/103 tests. Plan 2 (sgui TUI) subagent-driven execution launched.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1777168220
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1777171228
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"session": "381f1956-c5fc-401e-be9e-e6c9fd3341f1", "line": 923}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
90541
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
## 22:10 | main
|
|
2
|
+
Created Python .gitignore (editor trash); amended commit email timbielawa@gmail.com→tim@lnx.cx; updated CLAUDE.md
|
|
3
|
+
## 22:29-23:45 | main
|
|
4
|
+
simplegals: architected sgui (shared core lib, CLI/TUI, Jinja2, XDG config, .meta/sidecars/*.json metadata, parallel workers+progress viz, urwid TUI (term-image compat), Pillow); finalized design (Approach A (layered), JSON conf (simpleGal.json CWD, -c override), RFC 3339 sidecars (.meta/<filename>.json), quality+copyright outputs, ProcessPoolExecutor workers, urwid 2-panel TUI, staged batch changes (Ctrl+|), nav spec); finalized 2026-04-25-architecture-design.md (self-review 3 fixes, reviewed user updates (JSON/deps/pagination), added single-page-html view).
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
## 01:27-01:58 | main
|
|
2
|
+
Finished 6 TUI features (0bd5e37); replaced _fmt_size→bitmath.Byte().best_prefix() (fee7c2b); getsize() (6690f0b) stat().st_size; preview centered; ^S flow-ctrl blocked IXON; file panel text clipping + marquee scroll on focus; preview_delay 75→125ms; 139/139 tests; pending ^C quit-prompt, ^W write-out; gh repo push incomplete
|
|
3
|
+
|
|
4
|
+
## 02:30 | main
|
|
5
|
+
Plan 1 (core+CLI, 53 tests) + Plan 2 sgui (7 tasks, subagent-driven); 103/103 passing; staging ↔ widget dataflow fixed; .omc/→.gitignore
|
|
6
|
+
|
|
7
|
+
## 03:50 | main
|
|
8
|
+
Pushed repo live; pyproject.toml: bitmath→2.0.0, term-image std pypi; rm allow-direct-refs flag
|
|
9
|
+
|
|
10
|
+
## 14:45 | main
|
|
11
|
+
Fixed 4 TUI bugs (quit key, preview API, mode-focus) app.py/preview_panel.py; 103/103 tests; started dirty indicator, tab cycling, preview scaling
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
|
+
|
|
5
|
+
## Project Overview
|
|
6
|
+
|
|
7
|
+
`simpleGals` is a command-line static HTML image gallery generator. It takes directories of images and produces simple HTML files with thumbnails. There are two entry points:
|
|
8
|
+
|
|
9
|
+
- `simpleGals` — batch-mode CLI
|
|
10
|
+
- `sgui` — interactive TUI setup utility
|
|
11
|
+
|
|
12
|
+
Both commands operate in the current working directory, auto-creating `in/` (input images), `out/` (generated HTML), and `.meta/` (image metadata/cache).
|
|
13
|
+
|
|
14
|
+
## Tech Stack
|
|
15
|
+
|
|
16
|
+
- Python >= 3.12
|
|
17
|
+
- [`term-image`](https://github.com/AnonymouX47/term-image) for terminal image rendering (requires Kitty graphics protocol, iTerm2 inline image protocol, or Unicode truecolor support)
|
|
18
|
+
|
|
19
|
+
## Planned Architecture
|
|
20
|
+
|
|
21
|
+
- **`sgui`**: TUI with a split layout — scrollable file tree (left, ~20% width) and settings/preview panel (right). Navigation via arrow keys and Tab to switch focus. Escape toggles between image selection mode and general gallery settings.
|
|
22
|
+
- **Template system**: A default HTML template ships with the tool; users can fork it and point to a custom template via `--template/-t <TEMPLATE_DIR>` or the `sgui` settings panel.
|
|
23
|
+
- **Thumbnail caching**: `.meta/` stores image metadata and cached thumbnails. On repeat runs, thumbnails are regenerated only when the input file's last-modified time has changed.
|
|
24
|
+
- **Preview behavior**: A configurable delay (`preview_delay`, default 75ms) prevents rapid thumbnail generation while paging through files. First-load generates and caches; subsequent views are instant if unchanged.
|
|
25
|
+
|
|
26
|
+
## Key Configuration Settings (in `sgui`)
|
|
27
|
+
|
|
28
|
+
| Setting | Type | Default | Description |
|
|
29
|
+
|---|---|---|---|
|
|
30
|
+
| `file_panel_width` | `int` or `int%` | `30` | Width of the file tree panel |
|
|
31
|
+
| `scroll_rate` | `float` | `2.0` | Marquee scroll rate (chars/sec) for truncated filenames |
|
|
32
|
+
| `preview_delay` | `int` (ms) | `75` | Delay before generating a thumbnail for the first time |
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
.PHONY: build publish publish-test clean-dist test
|
|
2
|
+
|
|
3
|
+
VENV := .venv
|
|
4
|
+
PYTHON := $(VENV)/bin/python
|
|
5
|
+
TWINE := $(VENV)/bin/twine
|
|
6
|
+
|
|
7
|
+
build: clean-dist
|
|
8
|
+
$(PYTHON) -m build
|
|
9
|
+
|
|
10
|
+
publish-test: build
|
|
11
|
+
$(TWINE) upload --verbose --repository TEST dist/*
|
|
12
|
+
|
|
13
|
+
publish: build
|
|
14
|
+
$(TWINE) upload --verbose --repository simplegalsprod dist/*
|
|
15
|
+
|
|
16
|
+
test:
|
|
17
|
+
$(VENV)/bin/pytest tests/
|
|
18
|
+
|
|
19
|
+
clean-dist:
|
|
20
|
+
rm -rf dist/
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: simplegals
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A simple command-line static HTML image gallery generator with a TUI setup utility
|
|
5
|
+
Project-URL: Repository, https://github.com/timlnx/simpleGals
|
|
6
|
+
Author-email: Tim Case <tim@lnx.cx>
|
|
7
|
+
License: MIT
|
|
8
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
|
9
|
+
Classifier: Environment :: Console
|
|
10
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Operating System :: POSIX
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Classifier: Topic :: Internet :: WWW/HTTP
|
|
17
|
+
Classifier: Topic :: Multimedia :: Graphics
|
|
18
|
+
Classifier: Topic :: Multimedia :: Graphics :: Presentation
|
|
19
|
+
Classifier: Topic :: Utilities
|
|
20
|
+
Requires-Python: >=3.12
|
|
21
|
+
Requires-Dist: bitmath>=2.0.0
|
|
22
|
+
Requires-Dist: jinja2
|
|
23
|
+
Requires-Dist: piexif
|
|
24
|
+
Requires-Dist: pillow
|
|
25
|
+
Requires-Dist: term-image
|
|
26
|
+
Requires-Dist: urwid
|
|
27
|
+
Provides-Extra: dev
|
|
28
|
+
Requires-Dist: build; extra == 'dev'
|
|
29
|
+
Requires-Dist: pytest; extra == 'dev'
|
|
30
|
+
Requires-Dist: pytest-cov; extra == 'dev'
|
|
31
|
+
Requires-Dist: twine; extra == 'dev'
|
|
32
|
+
Provides-Extra: docs
|
|
33
|
+
Requires-Dist: myst-parser; extra == 'docs'
|
|
34
|
+
Requires-Dist: sphinx; extra == 'docs'
|
|
35
|
+
Requires-Dist: sphinx-autobuild; extra == 'docs'
|
|
36
|
+
Requires-Dist: sphinx-rtd-theme; extra == 'docs'
|
|
37
|
+
Description-Content-Type: text/markdown
|
|
38
|
+
|
|
39
|
+
# README.md
|
|
40
|
+
|
|
41
|
+
`simpleGals` is trying to be a very simple command-line driven static HTML image
|
|
42
|
+
gallery generating tool. simpleGals just like to have fun, it doesn't want you
|
|
43
|
+
getting bogged down with all the tedious overhead associated with fancy gals,
|
|
44
|
+
running software that has to get patched, or paying another subscription.
|
|
45
|
+
simpleGals ain't like that.
|
|
46
|
+
|
|
47
|
+
simpleGals isn't for album management. You feed simpleGals directories of images
|
|
48
|
+
and in return you get some simple HTML files with thumbnails.
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
# Tech Stack
|
|
52
|
+
|
|
53
|
+
- [Python](https://www.python.org/) >= 3.12
|
|
54
|
+
- [term-image](git+https://github.com/AnonymouX47/term-image.git)
|
|
55
|
+
- A terminal emulator with **any** of the following:
|
|
56
|
+
|
|
57
|
+
- support for the [Kitty graphics protocol](https://sw.kovidgoyal.net/kitty/graphics-protocol/)
|
|
58
|
+
- support for the [iTerm2 inline image protocol](https://iterm2.com/documentation-images.html)
|
|
59
|
+
- Unicode and direct-color (truecolor) support
|
|
60
|
+
- My [bitmath](git+https://github.com/timlnx/bitmath.git) library for file size printing and math
|
|
61
|
+
|
|
62
|
+
(I told you, it's simple)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
# Experience
|
|
66
|
+
|
|
67
|
+
The fanciest part of simpleGals is the tui setup utility. Launching `sgui` opens
|
|
68
|
+
the application in the current working directory, `sgui` (and the batch-mode
|
|
69
|
+
`simpleGals` interface) will create a directory called `out` and expects to find
|
|
70
|
+
a directory called `in`, these directories will be created if they do not
|
|
71
|
+
already exist. Image metadata and caching files are saved in a `.meta`
|
|
72
|
+
directory.
|
|
73
|
+
|
|
74
|
+
A basic template ships with simpleGals. Your can fork this template and instruct
|
|
75
|
+
simpleGals to use your template instead with the `--template,-t <TEMPLATE_DIR>`
|
|
76
|
+
option flag, or in the setup panel of `sgui`.
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
# `sgui`
|
|
80
|
+
|
|
81
|
+
The sgui launches with a scrollable file tree ('file panel') of discovered
|
|
82
|
+
images in the `in` directory listed on the left, just the file names, about 20%
|
|
83
|
+
of the screen up to a max width of ~=30 characters
|
|
84
|
+
|
|
85
|
+
* setting: `file_panel_width`
|
|
86
|
+
* desc: width in characters or percent of horizontal area
|
|
87
|
+
* types:
|
|
88
|
+
- `int` for absolute character value (e.g., `30` = 30 characters)
|
|
89
|
+
- `int%` for max width percent (e.g., `30%` = 30% of horizontal space)
|
|
90
|
+
* default: `30`
|
|
91
|
+
|
|
92
|
+
Move the selection cursor with with the up/down arrow keys, pausing or stopping
|
|
93
|
+
on a file name will marquee scroll the file name if it was truncated. The ctrl+n
|
|
94
|
+
and ctrl+p shortcuts also work for next and previous if you are in the file panel.
|
|
95
|
+
|
|
96
|
+
* setting: `scroll_rate`
|
|
97
|
+
* desc: scroll rate in chars/second
|
|
98
|
+
* type: `float`
|
|
99
|
+
* default: `2.0`
|
|
100
|
+
|
|
101
|
+
On the right using the remainder of the visible space is the general gallery
|
|
102
|
+
settings input panel. This panel is also where previewing and editing properties
|
|
103
|
+
of individual images takes place.
|
|
104
|
+
|
|
105
|
+
Pressing escape at any time shifts focus to the general gallery settings where
|
|
106
|
+
parameters like max columns/rows/per page/description information can be
|
|
107
|
+
provided. Press escape again to go back to the selection mode.
|
|
108
|
+
|
|
109
|
+
When moving the selection cursor between images in the file panel there is a
|
|
110
|
+
brief delay before the thumbnail is loaded the first time so you can page
|
|
111
|
+
through several in a row without attempting to generate thumbnails of each image
|
|
112
|
+
rapidly. Once a thumbnail is generated the delay is `0` if the last-modified
|
|
113
|
+
metadata has not changed for the input/thumbnail files
|
|
114
|
+
|
|
115
|
+
* setting: `preview_delay`
|
|
116
|
+
* description: delay before generating image metadata thumbnail the first time
|
|
117
|
+
* type: `int`
|
|
118
|
+
* default: `75ms`
|
|
119
|
+
|
|
120
|
+
Image thumbnails are displayed in the console using the `term-image` library. A
|
|
121
|
+
preview will take up no more than 55% of the available horizontal/vertical space
|
|
122
|
+
on the panel on the right.
|
|
123
|
+
|
|
124
|
+
Pressing tab switches cursor focus between the file panel and the main usage window.
|
|
125
|
+
|
|
126
|
+
# Settings
|
|
127
|
+
|
|
128
|
+
Settings are saved in JSON format.
|
|
129
|
+
|
|
130
|
+
Gallery metadata in the `.meta` directory includes a `cache/` directory with thumbnail images for the sgui browser. The file names are simply mapped back to the source images based on sha checksum (TODO: OR SOME OTHER FAST AND RELIABLE SIGNATURE METHOD). A simple YAML file records source image names (relative to the `in/` directory) and original image checksums, modification times, and preview generation times.
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
# Reference Material
|
|
137
|
+
|
|
138
|
+
* base library: https://github.com/AnonymouX47/term-image
|
|
139
|
+
* example usage: https://github.com/AnonymouX47/termvisage
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# README.md
|
|
2
|
+
|
|
3
|
+
`simpleGals` is trying to be a very simple command-line driven static HTML image
|
|
4
|
+
gallery generating tool. simpleGals just like to have fun, it doesn't want you
|
|
5
|
+
getting bogged down with all the tedious overhead associated with fancy gals,
|
|
6
|
+
running software that has to get patched, or paying another subscription.
|
|
7
|
+
simpleGals ain't like that.
|
|
8
|
+
|
|
9
|
+
simpleGals isn't for album management. You feed simpleGals directories of images
|
|
10
|
+
and in return you get some simple HTML files with thumbnails.
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# Tech Stack
|
|
14
|
+
|
|
15
|
+
- [Python](https://www.python.org/) >= 3.12
|
|
16
|
+
- [term-image](git+https://github.com/AnonymouX47/term-image.git)
|
|
17
|
+
- A terminal emulator with **any** of the following:
|
|
18
|
+
|
|
19
|
+
- support for the [Kitty graphics protocol](https://sw.kovidgoyal.net/kitty/graphics-protocol/)
|
|
20
|
+
- support for the [iTerm2 inline image protocol](https://iterm2.com/documentation-images.html)
|
|
21
|
+
- Unicode and direct-color (truecolor) support
|
|
22
|
+
- My [bitmath](git+https://github.com/timlnx/bitmath.git) library for file size printing and math
|
|
23
|
+
|
|
24
|
+
(I told you, it's simple)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
# Experience
|
|
28
|
+
|
|
29
|
+
The fanciest part of simpleGals is the tui setup utility. Launching `sgui` opens
|
|
30
|
+
the application in the current working directory, `sgui` (and the batch-mode
|
|
31
|
+
`simpleGals` interface) will create a directory called `out` and expects to find
|
|
32
|
+
a directory called `in`, these directories will be created if they do not
|
|
33
|
+
already exist. Image metadata and caching files are saved in a `.meta`
|
|
34
|
+
directory.
|
|
35
|
+
|
|
36
|
+
A basic template ships with simpleGals. Your can fork this template and instruct
|
|
37
|
+
simpleGals to use your template instead with the `--template,-t <TEMPLATE_DIR>`
|
|
38
|
+
option flag, or in the setup panel of `sgui`.
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
# `sgui`
|
|
42
|
+
|
|
43
|
+
The sgui launches with a scrollable file tree ('file panel') of discovered
|
|
44
|
+
images in the `in` directory listed on the left, just the file names, about 20%
|
|
45
|
+
of the screen up to a max width of ~=30 characters
|
|
46
|
+
|
|
47
|
+
* setting: `file_panel_width`
|
|
48
|
+
* desc: width in characters or percent of horizontal area
|
|
49
|
+
* types:
|
|
50
|
+
- `int` for absolute character value (e.g., `30` = 30 characters)
|
|
51
|
+
- `int%` for max width percent (e.g., `30%` = 30% of horizontal space)
|
|
52
|
+
* default: `30`
|
|
53
|
+
|
|
54
|
+
Move the selection cursor with with the up/down arrow keys, pausing or stopping
|
|
55
|
+
on a file name will marquee scroll the file name if it was truncated. The ctrl+n
|
|
56
|
+
and ctrl+p shortcuts also work for next and previous if you are in the file panel.
|
|
57
|
+
|
|
58
|
+
* setting: `scroll_rate`
|
|
59
|
+
* desc: scroll rate in chars/second
|
|
60
|
+
* type: `float`
|
|
61
|
+
* default: `2.0`
|
|
62
|
+
|
|
63
|
+
On the right using the remainder of the visible space is the general gallery
|
|
64
|
+
settings input panel. This panel is also where previewing and editing properties
|
|
65
|
+
of individual images takes place.
|
|
66
|
+
|
|
67
|
+
Pressing escape at any time shifts focus to the general gallery settings where
|
|
68
|
+
parameters like max columns/rows/per page/description information can be
|
|
69
|
+
provided. Press escape again to go back to the selection mode.
|
|
70
|
+
|
|
71
|
+
When moving the selection cursor between images in the file panel there is a
|
|
72
|
+
brief delay before the thumbnail is loaded the first time so you can page
|
|
73
|
+
through several in a row without attempting to generate thumbnails of each image
|
|
74
|
+
rapidly. Once a thumbnail is generated the delay is `0` if the last-modified
|
|
75
|
+
metadata has not changed for the input/thumbnail files
|
|
76
|
+
|
|
77
|
+
* setting: `preview_delay`
|
|
78
|
+
* description: delay before generating image metadata thumbnail the first time
|
|
79
|
+
* type: `int`
|
|
80
|
+
* default: `75ms`
|
|
81
|
+
|
|
82
|
+
Image thumbnails are displayed in the console using the `term-image` library. A
|
|
83
|
+
preview will take up no more than 55% of the available horizontal/vertical space
|
|
84
|
+
on the panel on the right.
|
|
85
|
+
|
|
86
|
+
Pressing tab switches cursor focus between the file panel and the main usage window.
|
|
87
|
+
|
|
88
|
+
# Settings
|
|
89
|
+
|
|
90
|
+
Settings are saved in JSON format.
|
|
91
|
+
|
|
92
|
+
Gallery metadata in the `.meta` directory includes a `cache/` directory with thumbnail images for the sgui browser. The file names are simply mapped back to the source images based on sha checksum (TODO: OR SOME OTHER FAST AND RELIABLE SIGNATURE METHOD). A simple YAML file records source image names (relative to the `in/` directory) and original image checksums, modification times, and preview generation times.
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
# Reference Material
|
|
99
|
+
|
|
100
|
+
* base library: https://github.com/AnonymouX47/term-image
|
|
101
|
+
* example usage: https://github.com/AnonymouX47/termvisage
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
SPHINXOPTS ?=
|
|
2
|
+
SPHINXBUILD ?= sphinx-build
|
|
3
|
+
SOURCEDIR = .
|
|
4
|
+
BUILDDIR = _build
|
|
5
|
+
|
|
6
|
+
.PHONY: help Makefile live
|
|
7
|
+
|
|
8
|
+
help:
|
|
9
|
+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
10
|
+
|
|
11
|
+
# live-reload local dev server: http://127.0.0.1:8000
|
|
12
|
+
live:
|
|
13
|
+
sphinx-autobuild "$(SOURCEDIR)" "$(BUILDDIR)/html" $(SPHINXOPTS)
|
|
14
|
+
|
|
15
|
+
%: Makefile
|
|
16
|
+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
project = "simpleGals"
|
|
2
|
+
copyright = "2026, timlnx"
|
|
3
|
+
author = "timlnx"
|
|
4
|
+
release = "0.1.0"
|
|
5
|
+
|
|
6
|
+
extensions = [
|
|
7
|
+
"myst_parser",
|
|
8
|
+
"sphinx.ext.autodoc",
|
|
9
|
+
"sphinx.ext.viewcode",
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
html_theme = "sphinx_rtd_theme"
|
|
13
|
+
|
|
14
|
+
source_suffix = {
|
|
15
|
+
".rst": "restructuredtext",
|
|
16
|
+
".md": "markdown",
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
# exclude design specs and internal planning docs from the built docs
|
|
20
|
+
exclude_patterns = ["_build", "superpowers/**"]
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# simpleGals
|
|
2
|
+
|
|
3
|
+
simpleGals is a command-line static HTML image gallery generator. Feed it a directory of
|
|
4
|
+
images; get back simple HTML files with thumbnails. No subscriptions, no album management,
|
|
5
|
+
no fuss.
|
|
6
|
+
|
|
7
|
+
```{toctree}
|
|
8
|
+
:maxdepth: 2
|
|
9
|
+
:caption: Contents
|
|
10
|
+
|
|
11
|
+
installation
|
|
12
|
+
usage
|
|
13
|
+
sgui
|
|
14
|
+
templates
|
|
15
|
+
configuration
|
|
16
|
+
```
|