From 5d0084bac56b504131add2a49325412f83f16a57 Mon Sep 17 00:00:00 2001 From: "Prof. Dr. Matthias Jung DL9MJ" Date: Sun, 1 Jun 2025 09:15:49 +0200 Subject: [PATCH] feature: add ability to download includes --- src/download.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/download.py b/src/download.py index 72f37b4..521a3c2 100644 --- a/src/download.py +++ b/src/download.py @@ -131,3 +131,13 @@ class Download: Parallel(n_jobs=multiprocessing.cpu_count())( delayed(build_picture)(picture) for picture in tqdm(pictures, desc="Build All Pictures") ) + + def download_includes(self): + includes = self.api.get("items/include", params={"limit": -1}) + + result = {} + for include in tqdm(includes, desc="Downloading includes"): + result[include["ident"]] = include["content"] + + with open("data/includes.json", "w") as f: + json.dump(result, f, indent=4)