diff options
| author | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2025-06-12 08:27:00 +0200 |
|---|---|---|
| committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2025-08-12 07:47:30 +0200 |
| commit | f25f39e6d26644aeeef72433f67fc6d9e638c800 (patch) | |
| tree | afe63732b69d6fd1d1fed63fb6c77c2d94839763 /tools/net/ynl/pyynl/lib/__init__.py | |
| parent | dd5d5a11bacb2eb0e00e0f6a9bc919afed2ec751 (diff) | |
tools: ynl_gen_rst.py: Split library from command line tool
As we'll be using the Netlink specs parser inside a Sphinx
extension, move the library part from the command line parser.
While here, change the code which generates an index file
to parse inputs from both .rst and .yaml extensions. With
that, the tool can easily be tested with:
tools/net/ynl/pyynl/ynl_gen_rst.py -x -o Documentation/netlink/specs/foo.rst
Without needing to first generate a temp directory with the
rst files.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
Diffstat (limited to 'tools/net/ynl/pyynl/lib/__init__.py')
| -rw-r--r-- | tools/net/ynl/pyynl/lib/__init__.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/net/ynl/pyynl/lib/__init__.py b/tools/net/ynl/pyynl/lib/__init__.py index 71518b9842ee..5f266ebe4526 100644 --- a/tools/net/ynl/pyynl/lib/__init__.py +++ b/tools/net/ynl/pyynl/lib/__init__.py @@ -4,6 +4,8 @@ from .nlspec import SpecAttr, SpecAttrSet, SpecEnumEntry, SpecEnumSet, \ SpecFamily, SpecOperation, SpecSubMessage, SpecSubMessageFormat from .ynl import YnlFamily, Netlink, NlError +from .doc_generator import YnlDocGenerator + __all__ = ["SpecAttr", "SpecAttrSet", "SpecEnumEntry", "SpecEnumSet", "SpecFamily", "SpecOperation", "SpecSubMessage", "SpecSubMessageFormat", "YnlFamily", "Netlink", "NlError"] |