xpyct_bot/to_json.py

14 lines
282 B
Python
Raw Permalink Normal View History

2021-11-01 14:56:05 +01:00
import json
ar = []
with open('cenz.txt', encoding='utf-8') as r:
for i in r:
n = i.lower().split('\n')[0]
if n != '':
ar.append(n)
with open('cenz.json', 'w', encoding='utf-8') as e:
json.dump(ar, e)
#Run this file for generate the cenz.json