re-separate rename/organize, canonical --resort for AI folders
rename-ai-snaps is rename-only again (+--include-renamed, +--only-generic); extract-ai-meta is the shared recursive metadata engine emitting canonical model/lora dest paths; organize-images does all sorting, gains --resort for idempotent tree re-sorts (used to fix ~10K old-scheme folders on the NAS).
This commit is contained in:
21
AGENTS.md
21
AGENTS.md
@@ -50,8 +50,29 @@ sleep ──→ idlecheck_caffeinatestuck
|
||||
|
||||
pull-all ──→ iterates repos in ~/git/ matching *schmeeve* remote
|
||||
checkin-all ──→ iterates repos in ~/git/ matching *schmeeve* remote
|
||||
|
||||
comfyui-sync (systemd timer on nimo.loc, ~/git checkout)
|
||||
├── neatcli organize --by-type (drops → Pictures/Images/)
|
||||
├── rename-ai-snaps . -n (rename in place, top-level only)
|
||||
└── organize-images -e (sort into AI/{model}/{lora}/)
|
||||
```
|
||||
|
||||
### Image pipeline (ComfyUI)
|
||||
|
||||
Strict separation of concerns — do NOT re-merge them:
|
||||
|
||||
| Script | Role |
|
||||
|---|---|
|
||||
| `rename-ai-snaps` | Rename ONLY, in place, to `schmeeve-AI-{keywords}.png`. Skips `schmeeve-AI-*` unless `--include-renamed`; `--only-generic` limits to `ComfyUI_*` names. PNG only. |
|
||||
| `organize-images` | ALL sorting/moving. Default: top-level → `AI/ Photos/ Screenshots/ Unsorted/`. `--resort <Images root>`: recursive canonical re-sort into `AI/{model}/{lora}/` (never renames files). |
|
||||
| `extract-ai-meta` | Shared metadata engine. JSON manifest `relpath → {model, loras, dest}`; `dest` is the canonical sanitized folder (`+`-joined LoRAs, capped 200 chars). Presence in manifest = is an AI image. |
|
||||
|
||||
Canonical folder sanitizer lives in `extract-ai-meta` (`sanitize_dir_name`):
|
||||
path prefixes stripped (`\`→`/`, basename), spaces/specials → `_`. Anything else
|
||||
creating `AI/` subfolders must match it exactly.
|
||||
|
||||
`sync-comfyui-snaps` is the dormant cron predecessor of `comfyui-sync`.
|
||||
|
||||
Sub-scripts are invoked via `/bin/bash` or `/bin/sh`, never sourced.
|
||||
|
||||
### Trigger chain
|
||||
|
||||
Reference in New Issue
Block a user