diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2023-05-05 14:41:19 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2023-05-08 21:58:56 +0200 |
commit | 6b77b76816a839ad6e9ebb0c9bb9327dcf406ac9 (patch) | |
tree | 993566e6afd8b72fb0d999947271b7c616c0963c /spec2modules.py | |
parent | 7f17434854c78299bf17d218b0d35d14658205e4 (diff) |
glossary: Support hierarchical glossary terms
Diffstat (limited to 'spec2modules.py')
-rwxr-xr-x | spec2modules.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/spec2modules.py b/spec2modules.py index 8c86d396..b2a5e8bb 100755 --- a/spec2modules.py +++ b/spec2modules.py @@ -30,6 +30,8 @@ import difflib import sys import rtemsspec +from rtemsspec.items import EmptyItem +from rtemsspec.sphinxcontent import SphinxInterfaceMapper def _diff(obj: rtemsspec.content.Content, path: str) -> None: @@ -70,18 +72,24 @@ def main() -> None: config = rtemsspec.util.load_config("config.yml") item_cache = rtemsspec.items.ItemCache(config["spec"]) item_cache.set_enabled([], rtemsspec.items.item_is_enabled) + group_uids = [ + doc["group"] for doc in config["interface-documentation"]["groups"] + ] + for uid in config["glossary"]["project-groups"]: + group = item_cache[uid] + assert group.type == "glossary/group" + rtemsspec.glossary.augment_glossary_terms(group, []) rtemsspec.validation.generate(config["validation"], item_cache, args.targets) if not args.targets: - group_uids = [ - doc["group"] for doc in config["interface-documentation"]["groups"] - ] rtemsspec.interface.generate(config["interface"], item_cache) rtemsspec.applconfig.generate(config["appl-config"], group_uids, item_cache) rtemsspec.specdoc.document(config["spec-documentation"], item_cache) - rtemsspec.glossary.generate(config["glossary"], group_uids, item_cache) + rtemsspec.glossary.generate( + config["glossary"], item_cache, + SphinxInterfaceMapper(EmptyItem(), group_uids)) rtemsspec.interfacedoc.generate(config["interface-documentation"], item_cache) |