add notabenoid export tool

This commit is contained in:
Alexander Popov 2017-02-14 01:59:15 +03:00
parent 02e31c37b2
commit 297dc95835
2 changed files with 34 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
strings.dat
result.txt

32
notabenoid_split.py Normal file
View File

@ -0,0 +1,32 @@
#!/usr/bin/env python3
import json
__author__ = 'Alexander Popov'
__version__ = '0.1.0'
__license__ = 'Unlicense'
exportData = list()
def loadStrings():
with open('strings.dat', 'r', encoding='utf-8') as f:
jsonData = json.loads(f.read())
for string in jsonData:
exportData.append(jsonData[string]['localizedName'])
return('Complete!')
def saveStrings():
with open('result.txt', 'w+', encoding='utf-8') as f:
for string in exportData:
f.write('%s\n' % string)
return('Complete!')
if __name__ == '__main__':
print('Loading strings...', loadStrings())
print('Save strings for notabenoid...', saveStrings())
print('\nComplete!')