fix: [tool] Write in utf8

pull/176/head
mokaddem 2019-11-05 15:13:41 +01:00
parent 07fa7a0553
commit a7bba2caeb
3 changed files with 480 additions and 480 deletions

File diff suppressed because it is too large Load Diff

View File

@ -14,7 +14,7 @@ def fetchTaxonomies():
allTaxonomies = list(taxonomiesFolder.glob('./*/machinetag.json'))
allTaxonomies.sort()
for taxonomyFile in allTaxonomies:
with open(taxonomyFile) as f:
with open(taxonomyFile, 'rb') as f:
taxonomy = json.load(f)
taxonomies.append(taxonomy)
return taxonomies
@ -39,7 +39,7 @@ def generateManifest(taxonomies):
def saveManifest(manifest):
with open(TAXONOMY_ROOT_PATH / 'MANIFEST.json', 'w') as f:
json.dump(manifest, f, indent=2, sort_keys=True)
json.dump(manifest, f, indent=2, sort_keys=True, ensure_ascii=False)
def awesomePrint(text):
print('\033[1;32m{}\033[0;39m'.format(text))

View File

@ -14,7 +14,7 @@ def fetchTaxonomies():
allTaxonomies = list(taxonomiesFolder.glob('./*/machinetag.json'))
allTaxonomies.sort()
for taxonomyFile in allTaxonomies:
with open(taxonomyFile) as f:
with open(taxonomyFile, 'rb') as f:
taxonomy = json.load(f)
taxonomies.append(taxonomy)
return taxonomies
@ -39,7 +39,7 @@ def generateMarkdown(taxonomies):
return markdown
def saveMarkdown(markdown):
with open(TAXONOMY_ROOT_PATH / 'Summary.md', 'w') as f:
with open(TAXONOMY_ROOT_PATH / 'summary.md', 'w') as f:
f.write(markdown)
def awesomePrint(text):