mirror of
https://github.com/bvanroll/startrek-ml.git
synced 2025-08-28 11:32:43 +00:00
13 lines
394 B
Python
13 lines
394 B
Python
import sys, os
|
|
|
|
folder = sys.argv[1]
|
|
strDataStruct = '{"Episodes":['
|
|
for file in os.listdir(folder):
|
|
print(file)
|
|
if(file.endswith('.json')):
|
|
with open(folder+"/"+file, "r") as infile:
|
|
strDataStruct=strDataStruct+infile.read()+","
|
|
strDataStruct=strDataStruct[:len(strDataStruct)-1]+"]}"
|
|
with open("OUTPUTFILE.json", "w+") as outfile:
|
|
outfile.write(strDataStruct)
|