Created
September 4, 2015 07:42
-
-
Save howaboutudance/814aaff7a49c9993f1e0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
json_file = json.load(open("temp.json")) | |
result = "" # resulting string | |
for x in json_file["files"]:# "files" for key value that is assigned to | |
# the file array | |
chapter_file = open(x) | |
result += chapter_file.read() | |
# open output_file, write out, flush buffer to complete write and close | |
output_file = open("output.md","w") | |
output_file.write(result) | |
output_file.flush() | |
output_file.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment