diff options
author | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2025-06-12 09:58:56 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2025-08-12 07:47:30 +0200 |
commit | bb1e3629b2e684e03adb21d75c7839f3afeb488e (patch) | |
tree | c09e5071dae62b7461de0b765d207a80ffde2a68 /scripts/lib/kdoc/kdoc_parser.py | |
parent | 3a3b8a144754858b59f108c7dc80eb613bf6fe64 (diff) |
docs: sphinx: add a parser for yaml files for Netlink specs
Add a simple sphinx.Parser to handle yaml files and add the
the code to handle Netlink specs. All other yaml files are
ignored.
The code was written in a way that parsing yaml for different
subsystems and even for different parts of Netlink are easy.
All it takes to have a different parser is to add an
import line similar to:
from doc_generator import YnlDocGenerator
adding the corresponding parser somewhere at the extension:
netlink_parser = YnlDocGenerator()
And then add a logic inside parse() to handle different
doc outputs, depending on the file location, similar to:
if "/netlink/specs/" in fname:
msg = self.netlink_parser.parse_yaml_file(fname)
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_parser.py')
0 files changed, 0 insertions, 0 deletions