mirror of
https://github.com/YosysHQ/yosys
synced 2025-07-25 21:57:01 +00:00
Docs: Improve cmd index
Lists all commands with their short help. Also link to it.
This commit is contained in:
parent
14a5cd6c4c
commit
c770c1e39d
2 changed files with 6 additions and 3 deletions
|
@ -12,6 +12,8 @@ Command reference
|
||||||
|
|
||||||
.. todo:: Can we warn on command groups that aren't included anywhere?
|
.. todo:: Can we warn on command groups that aren't included anywhere?
|
||||||
|
|
||||||
|
:ref:`List of all commands<cmd-cmd>`
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 2
|
:maxdepth: 2
|
||||||
|
|
||||||
|
|
|
@ -474,7 +474,7 @@ class TagIndex(Index):
|
||||||
lis.append((
|
lis.append((
|
||||||
dispname, 0, docname,
|
dispname, 0, docname,
|
||||||
anchor,
|
anchor,
|
||||||
docname, '', typ
|
'', '', ''
|
||||||
))
|
))
|
||||||
ret = [(k, v) for k, v in sorted(content.items())]
|
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.
|
Qualifier and description are not rendered e.g. in LaTeX output.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
content = {}
|
content: dict[str, list[tuple]] = {}
|
||||||
items = ((name, dispname, typ, docname, anchor)
|
items = ((name, dispname, typ, docname, anchor)
|
||||||
for name, dispname, typ, docname, anchor, prio
|
for name, dispname, typ, docname, anchor, prio
|
||||||
in self.domain.get_objects()
|
in self.domain.get_objects()
|
||||||
if typ == self.name)
|
if typ == self.name)
|
||||||
items = sorted(items, key=lambda item: item[0])
|
items = sorted(items, key=lambda item: item[0])
|
||||||
for name, dispname, typ, docname, anchor in items:
|
for name, dispname, typ, docname, anchor in items:
|
||||||
|
title = self.domain.data['obj2title'].get(name)
|
||||||
lis = content.setdefault(self.shortname, [])
|
lis = content.setdefault(self.shortname, [])
|
||||||
lis.append((
|
lis.append((
|
||||||
dispname, 0, docname,
|
dispname, 0, docname,
|
||||||
anchor,
|
anchor,
|
||||||
'', '', typ
|
'', '', title
|
||||||
))
|
))
|
||||||
ret = [(k, v) for k, v in sorted(content.items())]
|
ret = [(k, v) for k, v in sorted(content.items())]
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue