add notabenoid export tool
This commit is contained in:
parent
02e31c37b2
commit
297dc95835
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
strings.dat
|
||||||
|
result.txt
|
32
notabenoid_split.py
Normal file
32
notabenoid_split.py
Normal 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!')
|
Loading…
Reference in New Issue
Block a user