summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/build.py10
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)