From d7292e821ecfea9909abf6cb85c130fe2a02b926 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Mon, 15 Jun 2026 14:38:20 +0300 Subject: Update refresh-irregular-ninja skill to use git repo instead of Desktop --- prompts/skills/refresh-irregular-ninja/SKILL.md | 82 ++++++++++++++++++------- 1 file changed, 59 insertions(+), 23 deletions(-) diff --git a/prompts/skills/refresh-irregular-ninja/SKILL.md b/prompts/skills/refresh-irregular-ninja/SKILL.md index 9467885..93f93ca 100644 --- a/prompts/skills/refresh-irregular-ninja/SKILL.md +++ b/prompts/skills/refresh-irregular-ninja/SKILL.md @@ -1,12 +1,17 @@ --- name: refresh-irregular-ninja -description: Regenerate the irregular.ninja photo album and sync it to both web servers. Use when the user asks to refresh, update, publish, sync, or deploy the irregular.ninja photo site. Triggers on, irregular ninja, refresh irregular, update photo album, sync irregular, deploy irregular.ninja. +description: Regenerate the irregular.ninja photo album with the shuriken tool and sync it to both web servers. Use when the user asks to refresh, update, publish, sync, or deploy the irregular.ninja photo site. Triggers on, irregular ninja, refresh irregular, update photo album, sync irregular, deploy irregular.ninja. --- # Refresh irregular.ninja -Regenerate the static photo album for `irregular.ninja` and deploy it to both -mirrors (`fishfinger.buetow.org` and `blowfish.buetow.org`). +Regenerate the static photo album for `irregular.ninja` with the **shuriken** +tool and deploy it to both mirrors (`fishfinger.buetow.org` and +`blowfish.buetow.org`). + +> The album was migrated from the old `photoalbum`/Makefile workflow to +> `shuriken`. There is no longer a `Makefile` or `photoalbumrc`; generation is +> driven entirely by `shuriken.conf`. Do not use `make` or `photoalbum`. ## When to Use @@ -16,39 +21,70 @@ mirrors (`fishfinger.buetow.org` and `blowfish.buetow.org`). ## Key Paths -- `~/Desktop/irregular.ninja`: working directory containing the Makefile and photoalbumrc. -- `~/Desktop/irregular.ninja/incoming`: symlink to the Pixel 7 Pro camera folder (`/home/paul/Syncthing/Pixel7Pro/DCIM/Irregular Ninja/irregular.ninja`). -- `~/Desktop/irregular.ninja/dist/`: generated output (HTML, photos, thumbs, blurs, index). +- `~/git/irregular.ninja/irregular.ninja`: working directory containing `shuriken.conf`. +- `~/git/irregular.ninja/irregular.ninja/shuriken.conf`: the shuriken config (title, geometry, + `IMAGE_JOBS`, `SHUFFLE=yes`, `SPLASH_PAGE=yes`, `INCOMING_DIR`, `DIST_DIR`, + `TEMPLATE_DIR=/usr/share/shuriken/templates/default`). Read by `shuriken` + automatically as `./shuriken.conf` — no `--config` flag needed. +- `~/git/irregular.ninja/irregular.ninja/incoming`: symlink to the Pixel 7 Pro camera folder + (`/home/paul/Syncthing/Pixel7Pro/DCIM/Irregular Ninja/irregular.ninja`). +- `~/git/irregular.ninja/irregular.ninja/dist/`: generated output (HTML, photos, thumbs, + blurs, `index.html`, `shuriken.json`). ## Workflow -1. **Generate** — run `make` from `~/Desktop/irregular.ninja`: +1. **(Optional) Preview the plan** — confirm the config loads and see the photo + count before writing anything: ```bash - cd ~/Desktop/irregular.ninja && make + cd ~/git/irregular.ninja/irregular.ninja && shuriken --dry-run ``` - This invokes `photoalbum generate photoalbumrc`, which: - - Scans the `incoming/` folder for new images - - Generates thumbs and blurs (ImageMagick) - - Builds per-page and per-photo HTML - - Updates navigation and `index.html` -2. **Sync to both servers** — rsync `dist/` to both mirrors with `--delete`: +2. **Generate** — run `shuriken --generate` from `~/git/irregular.ninja/irregular.ninja`: + ```bash + cd ~/git/irregular.ninja/irregular.ninja && shuriken --generate + ``` + This reads `./shuriken.conf` and: + - Scans the `incoming/` folder for supported images + - Creates thumbs, blurs, and scaled derivatives (ImageMagick), skipping any + that already exist + - Re-renders all per-page and per-photo HTML, navigation redirects, and the + `index.html` splash page + - Writes `dist/shuriken.json` generation metadata + + Generation can be slow on a full run (the album has ~600+ photos); run it in + the background and monitor the output if needed. To force a rebuild of + existing thumbs/blurs from scratch, add `--force`. + +3. **Sync to both servers** — rsync `dist/` to both mirrors with `--delete`: ```bash + cd ~/git/irregular.ninja/irregular.ninja for foo in fishfinger blowfish; do rsync -av --delete dist/ admin@${foo}.buetow.org:/var/www/htdocs/irregular.ninja/ - done + done ``` + Only sync when the user asks to publish/deploy/sync; a plain "regenerate" + request stops after step 2. ## Rules -1. Always run from `~/Desktop/irregular.ninja`. -2. Run `make` before syncing — never sync stale `dist/` output. -3. Use `rsync -av --delete` so removed photos are also removed from the servers. -4. Expect ImageMagick v7 deprecation warnings (`convert` vs `magick`); these are harmless. +1. Always run from `~/git/irregular.ninja/irregular.ninja`. +2. Use `shuriken`, not `make`/`photoalbum` (the old toolchain is gone). +3. Run `shuriken --generate` before syncing — never sync stale `dist/` output. +4. Use `rsync -av --delete` so removed photos are also removed from the servers. +5. `SHUFFLE=yes` with no `RANDOM_SEED`, so preview order changes every run; that + is expected. Set `RANDOM_SEED` in `shuriken.conf` only if reproducible output + is wanted. +6. The config's `TEMPLATE_DIR` points at the installed templates + (`/usr/share/shuriken/templates/default`); a feature needing newer templates + (e.g. a stats page) requires the installed `shuriken`/templates to be updated + first. ## Expected Output -- `make` prints generation progress per page and per photo. -- New photos show `Creating thumb …` and `Creating blur …` lines. -- Existing photos show `Already exists: …` and are skipped. -- rsync reports bytes sent and speedup for each host. +- `shuriken --generate` prints `Rendering