From efdb62688de2c582f08969adf56a9b11a9c3dc99 Mon Sep 17 00:00:00 2001 From: Jono Yang Date: Wed, 2 Jun 2021 12:00:10 -0700 Subject: [PATCH] Expose SPDX license info in index.json #7 * Expose spdx_license_key, other_spdx_license_keys, and is_exception Signed-off-by: Jono Yang --- app.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index 5f61f53898..ca189fcb0d 100644 --- a/app.py +++ b/app.py @@ -74,12 +74,15 @@ def generate_indexes(output_path): index = [ { "license_key": key, + "spdx_license_key": license.spdx_license_key, + "other_spdx_license_keys": license.other_spdx_license_keys, + "is_exception": license.is_exception, "json": f"{key}.json", "yml": f"{key}.yml", "html": f"{key}.html", "text": f"{key}.LICENSE", } - for key in licenses.keys() + for key, license in licenses.items() ] write_file(output_path, "index.json", json.dumps(index)) write_file(output_path, "index.yml", saneyaml.dump(index))