mirror of
https://github.com/bvanroll/startrek-ml.git
synced 2025-08-29 03:52:47 +00:00
starting to get some work done
This commit is contained in:
12
jsonCombiner.py
Normal file
12
jsonCombiner.py
Normal file
@@ -0,0 +1,12 @@
|
||||
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)
|
Reference in New Issue
Block a user