- Go 55.6%
- templ 28.6%
- Shell 11.8%
- Nix 2.1%
- JavaScript 1.8%
- Other 0.1%
The job machinery and the page were ported there on the shared UI layer; the Tailwind build and sync-theme.sh went away with the port. This repo stays only until the ported binary is deployed and verified in its place. |
||
|---|---|---|
| static | ||
| vendor | ||
| .gitignore | ||
| .ignore | ||
| default.nix | ||
| flake.lock | ||
| flake.nix | ||
| go.mod | ||
| go.sum | ||
| index.templ | ||
| index_templ.go | ||
| jobs.go | ||
| jobs_test.go | ||
| main.go | ||
| README.md | ||
| site.go | ||
| sync-theme.sh | ||
| tailwind.config.js | ||
| test-smoke.sh | ||
gallery-dl-ui
MOVED — this app now lives in
rms/library-viewerascmd/downloader.The job machinery (job service, SSE progress, verify-before-skip, force, clear-finished) was ported there with
jobs_test.go, and its page was rebuilt on the shared UI layer so it matches the library viewer: same chrome, same stylesheet, same app switcher. The Tailwind build that lived here went away with it — that was always a stopgap, andsync-theme.shexisted only to keep this app's palette in step with the shared one.This repository is kept until the ported binary is deployed and verified in its place; the flake and the minerva module still point here. Do not start new work here — change
library-viewer/cmd/downloaderinstead.
gallery-dl UI
Tiny web UI for gallery-dl bulk gallery
downloads that packs each gallery into a .cbz comic archive.
Layout
media/pictures/
├── inbox/ # single downloads → <Title>.cbz lands here
└── gallery-dl/
└── <site>/ # bulk downloads → <Title>.cbz inside site folder
Site name is normalized from the URL host (greenshines.com → greenshines).
Build
nix build .#default # or: go build .
Generated assets (index_templ.go, static/style.css) are committed, so the
build needs no templ/tailwind toolchain.
Run
gallery-dl-ui
| Env var | Default | Purpose |
|---|---|---|
GDL_PICTURES_DIR |
/mnt/storage/data/media/pictures |
Base pictures dir (inbox/ and gallery-dl/ live here) |
GDL_BIN |
gallery-dl |
Path to the gallery-dl binary |
GDL_CONFIG |
(empty) | gallery-dl config file, passed with -c |
GDL_EXTRACTORS |
(empty) | Custom extractor dir, passed with -X |
GDL_LISTEN |
:8080 |
Listen address |
API
GET /— UIGET /api/jobs— job listPOST /api/jobs—{"mode":"single"|"bulk","urls":[...],"override":"/optional/dir"}GET /api/events— SSE stream (snapshot + per-job log updates)
Smoke test
nix shell nixpkgs#gallery-dl -c bash test-smoke.sh
Shared UI theme (with the library viewer)
This app and the library viewer (rms/library-viewer) are meant to read as one product. The palette
has a single source of truth — the shared stylesheet at
library-viewer/internal/ui/static/app.css — and this app, being a Tailwind project, cannot import
that CSS directly, so sync-theme.sh reads its tokens and generates tailwind.config.js from them:
./sync-theme.sh # regenerate tailwind.config.js from the shared stylesheet
./sync-theme.sh --check # exit 1 if it is out of date
tailwind.config.js is generated — change colours in the shared file, not here.
Rebuild order matters: Tailwind scans ./**/*.go, which is how it sees the generated
index_templ.go. So after editing index.templ:
templ generate # regenerate the Go
npx tailwindcss -i static/input.css -o static/style.css --minify # then the CSS
Running them the other way round leaves the CSS a version behind (and it looks like nothing changed, because the file size barely moves).
The header also follows the shared chrome conventions: the same header shape, and one app switcher
linking the two tools with aria-current="page" on whichever is active.
This is a stopgap. When the download UI moves into library-viewer/cmd/downloader it renders through
internal/ui like the viewer does, and both this script and the Tailwind build go away.