chore: run site tools through run_cli

The image and diagram scripts accepted abbreviated options and bypassed
run_cli. The FAQ checks read faq.md only, while the questions on hashes
and checks moved to technical-faq.md.
This commit is contained in:
Abdessamad Derraz committed 2026-10-22 12:46:34 +02:00
1 parent baf38ffbee
commit 42a0498d20
4 files changed
+16 -6

No files matched your search

+4 -2
View File
@@ -172,7 +172,7 @@ def fetch_icons() -> None:
def main() -> None:
parser = argparse.ArgumentParser(description=__doc__.split("\n\n")[0])
parser = argparse.ArgumentParser(allow_abbrev=False, description=__doc__.split("\n\n")[0])
parser.add_argument("--only", choices=("logos", "icons"), help="fetch one kind only")
args = parser.parse_args()
if args.only in (None, "logos"):
@@ -184,4 +184,6 @@ def main() -> None:
if __name__ == "__main__":
main()
from common import run_cli
run_cli(main)
+3 -1
View File
@@ -45,4 +45,6 @@ def main() -> None:
if __name__ == "__main__":
main()
from common import run_cli
run_cli(main)
+4 -2
View File
@@ -744,7 +744,7 @@ def write_svgs(directory: Path) -> list[Path]:
def main() -> None:
import argparse
parser = argparse.ArgumentParser(description="Write the site diagrams as SVG files.")
parser = argparse.ArgumentParser(allow_abbrev=False, description="Write the site diagrams as SVG files.")
parser.add_argument("--output-dir", default="tmp/diagrams", help="default: %(default)s")
args = parser.parse_args()
for path in write_svgs(Path(args.output_dir)):
@@ -752,4 +752,6 @@ def main() -> None:
if __name__ == "__main__":
main()
from common import run_cli
run_cli(main)
+5 -1
View File
@@ -779,7 +779,11 @@ class FaqRegressions(unittest.TestCase):
@staticmethod
def _faq() -> str:
return (ROOT / "wiki" / "faq.md").read_text(encoding="utf-8")
# The questions about hashes and checks moved to the technical FAQ.
return "\n\n".join(
(ROOT / "wiki" / name).read_text(encoding="utf-8")
for name in ("faq.md", "technical-faq.md")
)
@staticmethod
def _profile(key: str) -> dict: