Skip to content

feat: upload map image assets to the wiki#405

Merged
LVL1024 merged 1 commit into
developfrom
feature/upload-map-assets
Jul 16, 2026
Merged

feat: upload map image assets to the wiki#405
LVL1024 merged 1 commit into
developfrom
feature/upload-map-assets

Conversation

@LVL1024

@LVL1024 LVL1024 commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Uploads the three map plot images (golden statues, crate locations, shop locations) generated by the map parser to the wiki File namespace.

Adds a --force-asset-upload flag that can be toggled via workflow dispatch to re-upload existing images when map data changes.

Parsed data in deadlock-data PR - Reopen deadbot PR or run deploy workflow for this branch here to reparse the data

@LVL1024
LVL1024 requested a review from hassayag July 9, 2026 13:46
@LVL1024 LVL1024 linked an issue Jul 9, 2026 that may be closed by this pull request
@LVL1024
LVL1024 marked this pull request as ready for review July 15, 2026 00:04
Comment thread src/wiki/upload.py Outdated
Comment on lines +241 to +244
page = self.site.pages[page_title]
if page.exists and not self.force_asset_upload:
logger.trace(f'File "{page_title}" already exists on wiki, skipping.')
continue

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Files need to be handled automatically, can't rely on us checking a box. You mention that file upload always creates a new revision, but I had a play on the wiki itself and it blocks it. Have you tested that via the python client?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't test the live API earlier due to Codespace/Cloudflare blocks, which is why I left the manual guard in initially.
I've now removed the --force-asset-upload flag and the page.exists check entirely, and retested the updated code.

@LVL1024
LVL1024 force-pushed the feature/upload-map-assets branch 4 times, most recently from 8fa86f3 to 32f95a0 Compare July 15, 2026 21:32
Adds IMAGE_FILE_MAP to pages.py with the three map plot images
(golden statues, crate locations, shop locations) and a new
_upload_assets() method in upload.py that uploads them to the
File: namespace. Skips files that already exist on the wiki to
avoid creating unnecessary file revisions.
@LVL1024
LVL1024 force-pushed the feature/upload-map-assets branch from 32f95a0 to 8c712d8 Compare July 15, 2026 21:47
@LVL1024
LVL1024 requested a review from hassayag July 15, 2026 21:53
@LVL1024
LVL1024 merged commit 44d43fb into develop Jul 16, 2026
2 checks passed
@LVL1024
LVL1024 deleted the feature/upload-map-assets branch July 16, 2026 17:35
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.

Upload map image assets to the wiki

2 participants