diff --git a/scripts/gen_docs.py b/scripts/gen_docs.py index b2a86af3..5e1b5c07 100755 --- a/scripts/gen_docs.py +++ b/scripts/gen_docs.py @@ -102,7 +102,7 @@ def wrap_docs_page(table_content, gen, gen_dir, curr_page, json_file, title, is_ if title is None and gen: title = 'Gen ' + str(gen) + (f' (new sprites only)' if new_sprites_only else '') - + main_info = '''
This table lists all inventory item sprites. These items are from the last several games and is up-to-date as of Pokémon Sword/Shield. The sprites are from Gen 3 through 8.
All sprites are 32×32 in size. There are two sets of sprites: one with a Sword/Shield style white outline around the sprites, and one without (as all previous games). Both sets contain the same number of sprites, and both are listed below.
@@ -206,7 +206,7 @@ def run_cmd(cmd): return subprocess.check_output(cmd, cwd=BASE_DIR).strip().decode('utf-8') def write_file(filename, content): - with open(filename, 'wt') as file: + with open(filename, 'wt', encoding="utf8") as file: print(content, file=file) def docs_url(slug): @@ -236,7 +236,7 @@ def read_repo_state(): def read_json_file(file): '''Reads a single JSON and returns a dict''' - with open(file) as json_file: + with open(file, encoding="utf8") as json_file: return json.load(json_file) def read_data(): @@ -535,7 +535,7 @@ def generate_misc_table(misc, meta, curr_page, json_file, version = '[unknown]', rowspan = f' rowspan="{rows}"' if rows > 1 else '' buffer.append(f'