hp-library/jsonsorting/verif2.py

19 lines
368 B
Python
Raw Normal View History

2020-05-08 11:56:37 +02:00
import json
# Using readlines()
fileslist = open('0-listoffiles.txt', 'r')
Lines = fileslist.readlines()
fileoutput = open('alllines.txt','a')
# Strips the newline character
for line in Lines:
fileoutput.write(line)
with open('mergedjson.json') as jsonfile:
data = json.load(jsonfile)
for f in data:
file = f["debrispath"]
fileoutput.write(file+"\n")