From b5d04ce1bc1c99a8f538073de9befc6effd3fb1c Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 21 Jul 2026 14:56:59 +0100 Subject: [PATCH] Add specific tab to ad hoc --- .screenshotter/README.md | 7 ++++- .screenshotter/src/screenshotter.mjs | 44 ++++++++++++++++++++++++++-- 2 files changed, 48 insertions(+), 3 deletions(-) diff --git a/.screenshotter/README.md b/.screenshotter/README.md index 9011c6db72..e2776340e0 100644 --- a/.screenshotter/README.md +++ b/.screenshotter/README.md @@ -167,17 +167,22 @@ node .screenshotter/src/screenshotter.mjs --one /hardware/create --as assetmgr # With a custom output name node .screenshotter/src/screenshotter.mjs --one /licenses/5 --as licensemgr --name license-detail +# Shoot a specific tab on a view page +node .screenshotter/src/screenshotter.mjs --one /hardware/1 --tab licenses +node .screenshotter/src/screenshotter.mjs --one /hardware/1 --tab "components" + # Dark mode, no framing COLOR_SCHEME=dark FRAME=false node .screenshotter/src/screenshotter.mjs --one /hardware --as admin ``` -Ad-hoc shots land in `.screenshotter/screenshots/adhoc/{username}-{name}-{timestamp}.png`. The `adhoc/` directory is deliberately preserved across full walkthrough runs so historical one-off images stick around, and every ad-hoc shot carries a timestamp so repeated captures of the same URL never overwrite each other. +Ad-hoc shots land in `.screenshotter/screenshots/adhoc/{username}-{name}-{timestamp}.png`, or with `-tab-{slug}` in the filename when `--tab` is used. The `adhoc/` directory is deliberately preserved across full walkthrough runs so historical one-off images stick around, and every ad-hoc shot carries a timestamp so repeated captures of the same URL never overwrite each other. Arguments: - `--one ` (required) URL path to shoot, with or without a leading slash. - `--as ` (default: `USERNAME` env, which defaults to `admin`) user to log in as. Any seeded user works: `admin`, `snipe`, `assetmgr`, `licensemgr`, `accessorymgr`, `consumablemgr`, `componentmgr`, `usermgr`, etc. - `--name ` (default: URL path with `/` replaced by `__`) filename slug. The timestamp is appended automatically. +- `--tab