Rename variety sprites to correct Pokémon IDs#198
Conversation
|
I’ve run the rename script on two folders so far: |
scripts/rename_pokemon_varieties.py
Outdated
| new_path = os.path.join(root, new_filename) | ||
|
|
||
| # Prevent overwriting if the file already exists | ||
| # if not os.path.exists(new_path): |
There was a problem hiding this comment.
Why is this part commented? When a file is already present we could simply delete the id-variant.png file.
There was a problem hiding this comment.
I commented this out so the file is always renamed, which lets me double-check any differences between the id-variant and the Pokémon ID. The id-variant file is always deleted.
There was a problem hiding this comment.
I think there should be a case when there is a id-<variant> and a new custom <id> (10000+) present we compare both the images if they are same either rename or delete but if its different we flag that somewhere
6734f32 to
6d3db1d
Compare
|
@FallenDeity thanks for your suggestions, script updated |
|
Alright, thanks a lot @anhthang for the contribution and @FallenDeity for the much appreciated review! |
|
Now you can run the script on a single folder and create another PR. Then we'll do all the folders altogether. |
I've made 3 PRs for the |
This adds a script that renames variety PNG files (e.g. 877-hangry.png) to their correct Pokémon IDs by querying the Pokémon species endpoint and matching varieties by name.
Resolves #174.
First run against the official-artwork folder looks correct; I'll follow up with 2–3 other folders in this PRs and keep this minimal.