Thread (21 messages) 21 messages, 2 authors, 2025-07-11

Re: [PATCH v9 05/13] docs: sphinx: add a parser for yaml files for Netlink specs

From: Donald Hunter <donald.hunter@gmail.com>
Date: 2025-07-10 11:27:39
Also in: linux-doc, linux-kernel-mentees, lkml

Mauro Carvalho Chehab [off-list ref] writes:
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>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help