Auto-derive and download multi-faced card images#8649
Merged
NoahTheDuke merged 1 commit intomtgred:masterfrom Apr 2, 2026
Merged
Auto-derive and download multi-faced card images#8649NoahTheDuke merged 1 commit intomtgred:masterfrom
NoahTheDuke merged 1 commit intomtgred:masterfrom
Conversation
Replace the hardcoded cards-to-skip set with a system that auto-derives face-name-to-NRDB-index mappings from card data (:named-faces + :faces) and downloads face images separately. Manual overrides remain for cards where auto-derivation fails (SYNC, Earth Station). Co-Authored-By: Claude <noreply@anthropic.com>
NoahTheDuke
reviewed
Apr 2, 2026
| (defn- download-face-image | ||
| "Download a single face image from NRDB" | ||
| [{:keys [url file]}] | ||
| (binding [org.httpkit.client/*default-client* sni-client/default-client] |
NoahTheDuke
reviewed
Apr 2, 2026
| image (ImageIO/read input-stream) | ||
| path (.getPath file)] | ||
| (io/make-parents path) | ||
| (ImageIO/write image "png" (File. path))) |
Collaborator
There was a problem hiding this comment.
Is this needed? Aren't we just ripping the file directly from the server?
Contributor
Author
There was a problem hiding this comment.
This and the other change just mirror download-card-image in the same file. I didn't refactor to keep the PR simpler.
Collaborator
There was a problem hiding this comment.
Ah thanks, my bad for not knowing the existing code.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace the hardcoded cards-to-skip set with a system that auto-derives face-name-to-NRDB-index mappings from card data (:named-faces + :faces) and downloads face images separately. Manual overrides remain for cards where auto-derivation fails (SYNC, Earth Station).
Testing: this successfully downloaded the Melies card faces and did not attempt to re-download faces already committed to the repo.
Usually caveat of AI-assisted code, so please double check if this is idiomatic for the codebase.