stick with the section name

This commit is contained in:
Tobias Diekershoff 2020-09-26 15:53:50 +02:00
parent 9fb97a70be
commit 4920db1980

View file

@ -54,6 +54,9 @@ class ArchiveFile:
""" """
with open(filename,'r') as jsonData: with open(filename,'r') as jsonData:
data = json.load(jsonData) data = json.load(jsonData)
print(len(data))
for i in data:
print("{}\n".format(i))
self.filename = filename self.filename = filename
self.version = data['version'] self.version = data['version']
self.schema = data['schema'] self.schema = data['schema']
@ -79,7 +82,7 @@ class ArchiveFile:
outFile.write("Exported from Friendica Version: {}\n".format(self.version)) outFile.write("Exported from Friendica Version: {}\n".format(self.version))
outFile.write("Database schema version: {}\n".format(self.schema)) outFile.write("Database schema version: {}\n".format(self.schema))
outFile.write("Base URL: {}\n".format(self.baseurl)) outFile.write("Base URL: {}\n".format(self.baseurl))
with open(baseFileName+"userdata.txt", "w", encoding='utf8') as outFile: with open(baseFileName+"user.txt", "w", encoding='utf8') as outFile:
for k in self.user: for k in self.user:
outFile.write("{}: {}\n".format(k, self.user[k])) outFile.write("{}: {}\n".format(k, self.user[k]))
with open(baseFileName+"profile.txt", "w", encoding='utf8') as outFile: with open(baseFileName+"profile.txt", "w", encoding='utf8') as outFile: