From 34e3f81108457518cf248388daee7020a1b095eb Mon Sep 17 00:00:00 2001 From: Myk Taylor Date: Sat, 14 Oct 2023 13:46:49 -0700 Subject: [PATCH] don't list unavailable tools in indices --- docs/Tools.rst | 10 ++++++++-- docs/sphinx_extensions/dfhack/tool_docs.py | 3 ++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/Tools.rst b/docs/Tools.rst index 401276d7f..67d7edc54 100644 --- a/docs/Tools.rst +++ b/docs/Tools.rst @@ -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 `. +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 `. 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 ------------------------- diff --git a/docs/sphinx_extensions/dfhack/tool_docs.py b/docs/sphinx_extensions/dfhack/tool_docs.py index 836bab217..6c65e5918 100644 --- a/docs/sphinx_extensions/dfhack/tool_docs.py +++ b/docs/sphinx_extensions/dfhack/tool_docs.py @@ -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)