2022-07-10 00:01:46 -06:00
|
|
|
.. _search-plugin:
|
|
|
|
|
|
|
|
search
|
|
|
|
======
|
sync tags spreadsheet to git
spreadsheet - https://docs.google.com/spreadsheets/d/1hiDlo8M_bB_1jE-5HRs2RrrA_VZ4cRu9VXaTctX_nwk/edit#gid=170388995
sync command - for fname in *rst; do name=$(echo $fname | sed 's/[.]rst//'); tagline=$(egrep ",$name," ~/Downloads/DFHack\ taxonomy\ -\ Tool\ tags.csv | ~/Downloads/csvtotags.sh); sed -ri "s;[*]*Tags:.*;$tagline;" $fname; done
contents of csvtotags.sh -
fgrep . | sed -r 's/^[^,]+,([^,]+),[^.]+[.]"?,/\1,/' | awk -F, '
function tag(idx, tagname) {
if ($idx == "TRUE") {
if (hastag == 1) {printf(", ")}
printf("`tag/%s`", tagname)
hastag = 1
}
}
{
printf("%s", "**Tags:** ")
hastag = 0
tag(2, "adventure")
tag(3, "fort")
tag(4, "legends")
tag(5, "embark")
tag(6, "system")
tag(7, "dev")
tag(8, "auto")
tag(9, "productivity")
tag(10, "inspection")
tag(11, "design")
tag(12, "quickfort")
tag(13, "interface")
tag(14, "fps")
tag(15, "fix")
tag(16, "mod")
tag(17, "armok")
tag(18, "animals")
tag(19, "buildings")
tag(20, "items")
tag(21, "jobs")
tag(22, "map")
tag(23, "labors")
tag(24, "units")
tag(25, "stockpiles")
tag(26, "trees")
printf("\n")
}
'
2022-08-05 18:55:33 -06:00
|
|
|
**Tags:** `tag/fort`, `tag/productivity`, `tag/interface`
|
2022-07-29 18:38:23 -06:00
|
|
|
|
2022-08-05 11:08:23 -06:00
|
|
|
Adds search capabilities to the UI. The Stocks, Animals, Trading, Stockpile,
|
|
|
|
Noble (assignment candidates), Military (position candidates), Burrows (unit
|
|
|
|
list), Rooms, Announcements, Job List, and Unit List screens all get hotkeys
|
|
|
|
that allow you to dynamically filter the displayed lists.
|
2022-07-29 18:38:23 -06:00
|
|
|
|
|
|
|
Usage::
|
|
|
|
|
|
|
|
enable search
|
2022-07-10 00:01:46 -06:00
|
|
|
|
|
|
|
.. image:: ../images/search.png
|
|
|
|
|
|
|
|
Searching works the same way as the search option in :guilabel:`Move to Depot`.
|
2022-07-29 18:38:23 -06:00
|
|
|
You will see the Search option displayed on screen with a hotkey
|
|
|
|
(usually :kbd:`s`). Pressing it lets you start typing a query and the relevant
|
|
|
|
list will start filtering automatically.
|
2022-07-10 00:01:46 -06:00
|
|
|
|
2022-07-29 18:38:23 -06:00
|
|
|
Pressing :kbd:`Enter`, :kbd:`Esc` or the arrow keys will return you to browsing
|
|
|
|
the now filtered list, which still functions as normal. You can clear the filter
|
|
|
|
by either going back into search mode and backspacing to delete it, or pressing
|
|
|
|
the "shifted" version of the search hotkey while browsing the list (e.g. if the
|
|
|
|
hotkey is :kbd:`s`, then hitting :kbd:`Shift`:kbd:`s` will clear any filter).
|
2022-07-10 00:01:46 -06:00
|
|
|
|
|
|
|
Leaving any screen automatically clears the filter.
|
|
|
|
|
2022-07-29 18:38:23 -06:00
|
|
|
In the Trade screen, the actual trade will always only act on items that are
|
|
|
|
actually visible in the list; the same effect applies to the Trade Value numbers
|
|
|
|
displayed by the screen. Because of this, the :kbd:`t` key is blocked while
|
|
|
|
search is active, so you have to reset the filters first. Pressing
|
|
|
|
:kbd:`Alt`:kbd:`C` will clear both search strings.
|
2022-07-10 00:01:46 -06:00
|
|
|
|
|
|
|
In the stockpile screen the option only appears if the cursor is in the
|
|
|
|
rightmost list:
|
|
|
|
|
|
|
|
.. image:: ../images/search-stockpile.png
|
|
|
|
|
2022-07-29 18:38:23 -06:00
|
|
|
Note that the 'Permit XXX'/'Forbid XXX' keys conveniently operate only on items
|
|
|
|
actually shown in the rightmost list, so it is possible to select only fat or
|
|
|
|
tallow by forbidding fats, then searching for fat/tallow, and using Permit Fats
|
|
|
|
again while the list is filtered.
|