Skip to content

Thumbnail generator: read preset list from presetTextures.js - #108

Open
boinger wants to merge 1 commit into
CNCKitchen:mainfrom
boinger:chore/thumbs-read-presets
Open

Thumbnail generator: read preset list from presetTextures.js#108
boinger wants to merge 1 commit into
CNCKitchen:mainfrom
boinger:chore/thumbs-read-presets

Conversation

@boinger

@boinger boinger commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

generate_thumbs.py duplicates the 24-texture filename list from IMAGE_PRESETS in js/presetTextures.js, so adding a texture means editing both files (and forgetting the second means a missing thumbnail).

Parse the url: fields from presetTextures.js instead — adding a texture there is now the only edit needed. Fails loudly if the format ever changes rather than silently generating nothing.

Verified: the parsed list matches the previous hardcoded list exactly (24/24), and every referenced file exists in textures/.

generate_thumbs.py hardcoded the same 24 filenames as IMAGE_PRESETS;
adding a texture required editing both. Parse the url: fields instead;
fail loudly if none parse.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant