diff options
author | Johannes Löthberg <johannes@kyriasis.com> | 2016-11-15 14:11:31 +0100 |
---|---|---|
committer | Johannes Löthberg <johannes@kyriasis.com> | 2016-11-15 14:11:31 +0100 |
commit | 4edc709161fdc9fe47caeb23143c0f672f511297 (patch) | |
tree | b54a5f77c36f2f3aa91102830f047c82a4d305c3 | |
parent | 05dcd9f533711e42d80e85a06716c140c8b1f3e2 (diff) | |
download | kyblo-4edc709161fdc9fe47caeb23143c0f672f511297.tar.xz |
Move metadata loading to load_metadata
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
-rwxr-xr-x | scripts/build.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/build.py b/scripts/build.py index 560f503..4533513 100755 --- a/scripts/build.py +++ b/scripts/build.py @@ -31,7 +31,10 @@ def build_archive(jenv, entries): f.write(rendered) -def split_entries(entries): +def load_metadata(name): + with open(name) as f: + entries = json.load(f) + published = [] unpublished = [] @@ -55,10 +58,7 @@ if __name__ == '__main__': trim_blocks=True, lstrip_blocks=True) - with open('metadata.json') as f: - entries = json.load(f) - - published, unpublished = split_entries(entries) + published, unpublished = load_metadata('metadata.json') for entry in unpublished: build_entry(jenv, entry['file'], entry) |