don't list unavailable tools in indices

develop
Myk Taylor 2023-10-14 13:46:49 -07:00
parent d59170a798
commit 34e3f81108
No known key found for this signature in database
2 changed files with 10 additions and 3 deletions

@ -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:
@ -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
-------------------------

@ -140,7 +140,8 @@ class DFHackToolDirectiveBase(sphinx.directives.ObjectDescription):
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)