From 59790480ef76b521fa37c6654c8527010868d1ff Mon Sep 17 00:00:00 2001 From: Alexander Popov Date: Tue, 14 Feb 2017 02:03:22 +0300 Subject: [PATCH] with CLASS perfect --- notabenoid_split.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/notabenoid_split.py b/notabenoid_split.py index 7dd886b..6932642 100644 --- a/notabenoid_split.py +++ b/notabenoid_split.py @@ -3,7 +3,7 @@ import json __author__ = 'Alexander Popov' -__version__ = '0.1.0' +__version__ = '1.0.0' __license__ = 'Unlicense' exportData = list() @@ -14,15 +14,17 @@ def loadStrings(): jsonData = json.loads(f.read()) for string in jsonData: - exportData.append(jsonData[string]['localizedName']) + exportData.append('%s\n%s' % + (string, + jsonData[string]['localizedName'])) return('Complete!') def saveStrings(): - with open('result.txt', 'w+', encoding='utf-8') as f: + with open('result.txt', 'w+', encoding='utf-8', newline='\n') as f: for string in exportData: - f.write('%s\n' % string) + f.write('%s%s' % (string, '\n' * 3,)) return('Complete!')