Skip to content

Commit

Permalink
don't list unavailable tools in indices
Browse files Browse the repository at this point in the history
  • Loading branch information
myk002 committed Oct 14, 2023
1 parent d59170a commit 34e3f81
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
10 changes: 8 additions & 2 deletions docs/Tools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
DFHack tools
============

DFHack has **a lot** of tools. This page attempts to make it clearer what they
are, how they work, and how to find the ones you want.
DFHack comes with **a lot** of tools. This page attempts to make it clearer
what they are, how they work, and how to find the ones you want.

.. contents:: Contents
:local:
Expand Down Expand Up @@ -36,6 +36,12 @@ more than one category. If you already know what you're looking for, try the
`search` or Ctrl-F on this page. If you'd like to see the full list of tools in
one flat list, please refer to the `annotated index <all-tag-index>`.

Some tools are part of our back catalog and haven't been updated yet for v50 of
Dwarf Fortress. These tools are tagged as
`unavailable <unavailable-tag-index>`. They will still appear in the
alphabetical list at the bottom of this page, but unavailable tools will not
listed in any of the indices.

DFHack tools by game mode
-------------------------

Expand Down
3 changes: 2 additions & 1 deletion docs/sphinx_extensions/dfhack/tool_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ def add_index_entries(self, name) -> None:
anchor = to_anchor(self.get_tool_name_from_docname())
tags = self.env.domaindata['tag-repo']['doctags'][docname]
indexdata = (name, self.options.get('summary', ''), '', docname, anchor, 0)
self.env.domaindata['all']['objects'].append(indexdata)
if 'unavailable' not in tags:
self.env.domaindata['all']['objects'].append(indexdata)
for tag in tags:
self.env.domaindata[tag]['objects'].append(indexdata)

Expand Down

0 comments on commit 34e3f81

Please sign in to comment.