Project for the Hybrid Publishing thesis award of 2018. By Julie Boschat Thorez and Cristina Cochior. https://www.wdka.nl/work/sic-scripture http://51.255.169.99:8080/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

49 lines
941 B

import json
# Using readlines()
fileslist = open('listoffiles.txt', 'r')
Lines = fileslist.readlines()
count = 0
linesarray = []
matchingfilepaths = []
fileoutput = open('matchinglines.txt','a')
# Strips the newline character
for line in Lines:
# print(line)
line = line.strip('\n')
linesarray.append(line)
# with open("mergedjson.txt") as file:
# if line in file.read():
# print("true")
# else:
# print(line)
with open('mergedjson.json') as jsonfile:
data = json.load(jsonfile)
for f in data:
# print(f)
file = f["debrispath"]
if line == file:
# print("true")
matchingfilepaths.append(line)
fileoutput.write(line+'\n')
# print("====")
print(matchingfilepaths)
# with open('mergedjson.json') as jsonfile:
# # print(line)
# if "karen" in jsonfile:
# print("True")
# # else:
# # print(line)
# # print(line.strip())
# # print("Line{}: {}".format(count, line.strip()))