[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <95d1ed00026acbe425f036f860f7bcd1a18ce98b.1750925410.git.mchehab+huawei@kernel.org>
Date: Thu, 26 Jun 2025 10:13:04 +0200
From: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
To: Linux Doc Mailing List <linux-doc@...r.kernel.org>,
Jonathan Corbet <corbet@....net>
Cc: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
"Akira Yokosawa" <akiyks@...il.com>,
"Breno Leitao" <leitao@...ian.org>,
"David S. Miller" <davem@...emloft.net>,
"Donald Hunter" <donald.hunter@...il.com>,
"Eric Dumazet" <edumazet@...gle.com>,
"Ignacio Encinas Rubio" <ignacio@...cinas.com>,
"Jan Stancek" <jstancek@...hat.com>,
"Marco Elver" <elver@...gle.com>,
"Mauro Carvalho Chehab" <mchehab+huawei@...nel.org>,
"Paolo Abeni" <pabeni@...hat.com>,
"Randy Dunlap" <rdunlap@...radead.org>,
"Ruben Wauters" <rubenru09@....com>,
"Shuah Khan" <skhan@...uxfoundation.org>,
Jakub Kicinski <mchehab+huawei@...nel.org>,
Simon Horman <mchehab+huawei@...nel.org>,
joel@...lfernandes.org,
linux-kernel-mentees@...ts.linux.dev,
linux-kernel@...r.kernel.org,
lkmm@...ts.linux.dev,
netdev@...r.kernel.org,
peterz@...radead.org,
stern@...land.harvard.edu
Subject: [PATCH v8 08/13] tools: ynl_gen_rst.py: drop support for generating index files
As we're now using an index file with a glob, there's no need
to generate index files anymore.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
---
tools/net/ynl/pyynl/ynl_gen_rst.py | 28 ----------------------------
1 file changed, 28 deletions(-)
diff --git a/tools/net/ynl/pyynl/ynl_gen_rst.py b/tools/net/ynl/pyynl/ynl_gen_rst.py
index 010315fad498..90ae19aac89d 100755
--- a/tools/net/ynl/pyynl/ynl_gen_rst.py
+++ b/tools/net/ynl/pyynl/ynl_gen_rst.py
@@ -31,9 +31,6 @@ def parse_arguments() -> argparse.Namespace:
# Index and input are mutually exclusive
group = parser.add_mutually_exclusive_group()
- group.add_argument(
- "-x", "--index", action="store_true", help="Generate the index page"
- )
group.add_argument("-i", "--input", help="YAML file name")
args = parser.parse_args()
@@ -63,27 +60,6 @@ def write_to_rstfile(content: str, filename: str) -> None:
rst_file.write(content)
-def generate_main_index_rst(parser: YnlDocGenerator, output: str) -> None:
- """Generate the `networking_spec/index` content and write to the file"""
- lines = []
-
- lines.append(parser.fmt.rst_header())
- lines.append(parser.fmt.rst_label("specs"))
- lines.append(parser.fmt.rst_title("Netlink Family Specifications"))
- lines.append(parser.fmt.rst_toctree(1))
-
- index_dir = os.path.dirname(output)
- logging.debug("Looking for .rst files in %s", index_dir)
- for filename in sorted(os.listdir(index_dir)):
- base, ext = os.path.splitext(filename)
- if filename == "index.rst" or ext not in [".rst", ".yaml"]:
- continue
- lines.append(f" {base}\n")
-
- logging.debug("Writing an index file at %s", output)
- write_to_rstfile("".join(lines), output)
-
-
def main() -> None:
"""Main function that reads the YAML files and generates the RST files"""
@@ -102,10 +78,6 @@ def main() -> None:
write_to_rstfile(content, args.output)
- if args.index:
- # Generate the index RST file
- generate_main_index_rst(parser, args.output)
-
if __name__ == "__main__":
main()
--
2.49.0
Powered by blists - more mailing lists