-
Notifications
You must be signed in to change notification settings - Fork 227
Add order-trim-workorders script and documentation #1562
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
unboundlopez
wants to merge
3
commits into
DFHack:master
Choose a base branch
from
unboundlopez:order-trim-workorders
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,010
−0
Open
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| order-trim-workorders | ||
| ===================== | ||
|
|
||
| .. dfhack-tool:: | ||
| :summary: Pick, pretty-format, and trim work orders from DFHack order JSON files. | ||
| :tags: fort gui workorders | ||
|
|
||
| This script provides a two-step UI for trimming work order files in | ||
| ``dfhack-config/orders``: | ||
|
|
||
| 1. A picker that lists ``.json`` files and filters by filename. | ||
| 2. A trimmer that opens a pretty-formatted ``.txt`` variant 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). | ||
|
|
||
| Usage | ||
| ----- | ||
|
|
||
| :: | ||
|
|
||
| order-trim-workorders | ||
| order-trim-workorders --file <orders.json> | ||
|
|
||
| Arguments | ||
| --------- | ||
|
|
||
| ``--file <path-or-name>`` | ||
| Pretty-formats the target ``.json`` into its ``.txt`` variant without | ||
| opening the picker UI. If only a filename is provided, it is resolved under | ||
| ``dfhack-config/orders``. | ||
|
|
||
| Picker controls | ||
| --------------- | ||
|
|
||
| - Type in ``Search`` to filter filenames. | ||
| - :kbd:`Enter` or click opens the selected file in the trimmer. | ||
| - :kbd:`Esc` closes. | ||
|
|
||
| Trimmer controls | ||
| ---------------- | ||
|
|
||
| - Click to select a line. | ||
| - Toggle mark for the selected work order with: | ||
|
|
||
| - double left-click on the same line, or | ||
| - :kbd:`Enter` / :kbd:`Space` | ||
|
|
||
| - Hotkeys: | ||
|
|
||
| - :kbd:`Alt` + :kbd:`D`: apply deletions (remove all marked lines) | ||
| - :kbd:`Alt` + :kbd:`S`: save | ||
| - :kbd:`Alt` + :kbd:`R`: reload from disk | ||
| - :kbd:`Alt` + :kbd:`H`: toggle hide-noise display filter | ||
|
|
||
| - :kbd:`Esc` closes (prompts if there are unsaved changes). | ||
|
|
||
| Notes | ||
| ----- | ||
|
|
||
| - Save writes both the working ``.txt`` file and its companion ``.json`` file. | ||
| - Search in the trimmer shows whole matching work-order groups. | ||
| - Alternating row colors are used to help distinguish adjacent work orders. | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can't just make up new tags here you; there is no
guitag which is why the build failsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. I've removed that line as I wasn't using tags appropriately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not tagging the tool at all is also not a solution. Release select appropriate tags from the collection of available tags