From fee4dcbda4ee85e5c59d1b62937edf98bbf87bea Mon Sep 17 00:00:00 2001 From: Marc Wrobel Date: Sat, 7 Oct 2023 12:59:19 +0200 Subject: [PATCH] Allow upgrading the products directory in report.py --- report.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/report.py b/report.py index 9e58a990..91f8be24 100755 --- a/report.py +++ b/report.py @@ -1,11 +1,13 @@ import frontmatter +import sys import time from glob import glob products = {} count = 0 count_auto = 0 -for product_file in sorted(list(glob('website/products/*.md'))): +products_dir = sys.argv[1] if len(sys.argv) > 1 else 'website/products/' +for product_file in sorted(list(glob(f'{products_dir}/*.md'))): with open(product_file, "r") as f: data = frontmatter.load(f) count += 1