.. dfhack-tool::
:summary: Pick, pretty-format, and trim work orders from DFHack order JSON files.
This script provides a two-step UI for trimming work order files in
dfhack-config/orders:
- A picker that lists
.jsonfiles and filters by filename. - A trimmer that opens a pretty-formatted
.txtvariant and lets you mark whole work-order objects for deletion.
When a work order is marked, the full top-level JSON object is targeted (including lines currently hidden by hide-noise view filtering).
order-trim-workorders order-trim-workorders --file <orders.json>
--file <path-or-name>- Pretty-formats the target
.jsoninto its.txtvariant without opening the picker UI. If only a filename is provided, it is resolved underdfhack-config/orders.
- Type in
Searchto filter filenames. - Enter or click opens the selected file in the trimmer.
- Esc closes.
- Click to select a line.
- Toggle mark for the selected work order with:
- double left-click on the same line, or
- Enter / Space
- Hotkeys:
- Alt + D: apply deletions (remove all marked lines)
- Alt + S: save
- Alt + R: reload from disk
- Alt + H: toggle hide-noise display filter
- Esc closes (prompts if there are unsaved changes).
- Save writes both the working
.txtfile and its companion.jsonfile. - Search in the trimmer shows whole matching work-order groups.
- Alternating row colors are used to help distinguish adjacent work orders.