SharpTagManager can hand images and tags off to external scripts for processing — auto-tagging with a model, editing/sorting tags, transforming images, or any combination of the three. Scripts are separate programs that the app launches, sends work to, and applies whatever they hand back. This page covers installing and running scripts that already exist, which is what most users need. If you want to write your own, see Script Development.
Scripts live in the Scripts folder next to the exe — one flat folder, no kind/category subfolders.
- A single file — drop it straight into
Scripts. Common script types (.py,.bat/.cmd,.ps1,.sh,.vbs/.js,.exe, and a few others) are picked up automatically, no extra setup needed. - A whole folder — handy for
git cloneing a script repo straight intoScripts. A first-level subfolder counts as an installed script if it contains aSharpTagScript.jsonfile directly inside it; the folder's own name becomes the script's display name in the app.
Some scripts need extra Python packages or a specific Python version. If so, the app sets up an isolated environment for that script automatically the first time you run it, downloading a small helper tool if needed — you don't need Python pre-installed yourself, but that first run will take longer while the setup happens.
Some scripts expose settings — before they run, a Script Options dialog shows up with whatever checkboxes, dropdowns, numeric fields, text fields, or file/folder pickers that script defines. Open it any time from the Scripting menu's Edit settings item (see below). Whatever you set there is remembered for the profile the script is assigned to.
The app's Scripting menu works on a slot — either the transient "no profile" selection, or one of 10 persistent profiles (picked via the menu's Profile submenu). Whichever is active, the menu's other items act on it:
- Script: name — pick which script occupies the active slot.
- Edit settings — opens the Script Options dialog for the active slot's script (disabled if it has no options).
- Run script startup — runs the active slot's script with no image, just to confirm it starts (useful for checking a model loads correctly before batch-running it).
- Run on selected (
Ctrl+Q) — runs the active slot's script against the currently selected image(s).
A profile remembers both its assigned script and that script's option values, and persists across app restarts; the transient "no profile" slot does not. Profiles 1–10 also get one-key access: F1–F10 runs that profile "on selected", and Ctrl+F1–Ctrl+F10 runs its startup.
This makes it easy to set up, say, profile 1 as a tagger and profile 2 as a background-remover, and switch between them with a single keypress while working through a dataset.
Anything a script logs shows up in the app's script output window, so you can watch progress or diagnose a script that isn't behaving — useful when a script is slow to start (e.g. loading a model) or fails partway through a batch.