Next up putting all scripts through this casting process

This commit is contained in:
2018-05-20 12:57:09 +02:00
parent 0a4d89c047
commit 4721f448f3
180 changed files with 26233 additions and 0 deletions

28
Analyser.py Normal file
View File

@@ -0,0 +1,28 @@
import json
import sys, os
Cast = {}
string = sys.argv[1]
temp = ""
arrayOfStrings = []
space = " "
for x in range(0, 100):
arrayOfStrings.append(space)
space = space+" "
with open(string, "r") as infile:
fileNaam=infile.read().replace('\n', ' ')
array=fileNaam.split()
arrayFromCast = array[array.index("CAST")+1:]
Cast=arrayFromCast[:arrayFromCast.index("STAR")];
with open('output.json', 'w+') as outfile:
json.dump(Cast, outfile)
with open('Temp.txt', 'w+') as outfile:
outfile.write(temp)
outfile.close()