| Message ID | 20261120-gen-releases-svg-fixes-v2-3-abc66b9dd7da@bootlin.com |
|---|---|
| State | New |
| Headers | show |
| Series | tools/gen-releases-svg: fixes/improvements | expand |
Hi Antonin, On 11/20/26 9:14 AM, Antonin Godard wrote: > To improve readability, store the documentation root directory in a > variable and reuse it in the default assignment for -i and -o. > > Suggested-by: Quentin Schulz <quentin.schulz@cherry.de> > Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de> Thanks! Quentin
diff --git a/documentation/tools/gen-releases-svg b/documentation/tools/gen-releases-svg index 32458bd9e..f8dc8e72d 100755 --- a/documentation/tools/gen-releases-svg +++ b/documentation/tools/gen-releases-svg @@ -18,13 +18,16 @@ import tempfile from pathlib import Path +# documentation/ directory in yocto-docs +documentation_dir = Path(__file__).resolve().parent.parent + parser = argparse.ArgumentParser( description="Parse releases.json and output a releases.svg file" ) parser.add_argument("-i", help="Path to the releases.json file", dest="releases_json_path", - default=Path(__file__).resolve().parent.parent / "releases.json") + default=documentation_dir / "releases.json") parser.add_argument("-o", help="Path to the output SVG", dest="output", - default=Path(__file__).resolve().parent.parent / "ref-manual/svg/releases.svg") + default=documentation_dir / "ref-manual/svg/releases.svg") args = parser.parse_args() if not shutil.which("mmdc"):
To improve readability, store the documentation root directory in a variable and reuse it in the default assignment for -i and -o. Suggested-by: Quentin Schulz <quentin.schulz@cherry.de> Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> --- documentation/tools/gen-releases-svg | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)