want to output board description

This commit is contained in:
Adrian Malacoda 2016-11-27 01:21:07 -06:00
parent d54f3ec21c
commit 2e93aaa9bc

View File

@ -26,7 +26,10 @@ def output_board (data, destination):
os.makedirs(destination)
os.makedirs(os.path.join(destination, "threads"))
with open(os.path.join(destination, "index.json"), "w") as out_file:
out_file.write(json.dumps({"title": data.title}, indent=4))
out_file.write(json.dumps({
"title": data.title,
"description": data.description
}, indent=4))
for thread in data.children:
output_thread(thread, os.path.join(destination, "threads", thread.title))