3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-07-24 21:27:00 +00:00

Docs: Improve cmd index

Lists all commands with their short help.
Also link to it.
This commit is contained in:
Krystine Sherwin 2025-07-21 11:47:50 +12:00
parent 14a5cd6c4c
commit c770c1e39d
No known key found for this signature in database
2 changed files with 6 additions and 3 deletions

View file

@ -12,6 +12,8 @@ Command reference
.. todo:: Can we warn on command groups that aren't included anywhere?
:ref:`List of all commands<cmd-cmd>`
.. toctree::
:maxdepth: 2

View file

@ -474,7 +474,7 @@ class TagIndex(Index):
lis.append((
dispname, 0, docname,
anchor,
docname, '', typ
'', '', ''
))
ret = [(k, v) for k, v in sorted(content.items())]
@ -513,18 +513,19 @@ class CommandIndex(Index):
Qualifier and description are not rendered e.g. in LaTeX output.
"""
content = {}
content: dict[str, list[tuple]] = {}
items = ((name, dispname, typ, docname, anchor)
for name, dispname, typ, docname, anchor, prio
in self.domain.get_objects()
if typ == self.name)
items = sorted(items, key=lambda item: item[0])
for name, dispname, typ, docname, anchor in items:
title = self.domain.data['obj2title'].get(name)
lis = content.setdefault(self.shortname, [])
lis.append((
dispname, 0, docname,
anchor,
'', '', typ
'', '', title
))
ret = [(k, v) for k, v in sorted(content.items())]