Repository navigation
feat: option to export detected cards to files - #36
Open
leiteszeke wants to merge 1 commit into
Open
leiteszeke wants to merge 1 commit into
leiteszeke wants to merge 1 commit into
Conversation
Owner
|
Nice feature, I think we will add it in the next release! |
New "Export detected card info to files" checkbox in Feature flags (off by default). When it's on, the plugin passes DRAW2_CARD_INFO_DIR (a state folder next to decklists), the language and the full-db option to each backend, and the backend writes the current cards there. Useful for an OBS Text source with the card name, an overlay or a bot. Needs the matching change in the draw2 backend. README and translations updated.
leiteszeke
force-pushed
the
up/10-card-info
branch
from
November 2, 2026 21:45
c9a7124 to
c0eb156
Compare
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.
This is the plugin side of HichTala/draw2#40: an option to have the backend write the detected cards to files, so you can show the card name in an OBS Text source (or feed an overlay / bot).
It's built on top of #31 because it touches the same Feature flags tab, so the diff here includes those commits until #31 is merged. The commit for this PR is the last one.
There are two new checkboxes in Feature flags, both only matter when the first one is on (it's off by default):
When it's on, the plugin passes
DRAW2_CARD_INFO_DIRto each backend, pointing to astatefolder next todecklistsin plugin_config, plus the language and whether to download the full card db. When it's off nothing is passed and the backend runs as before.Then in OBS you add a Text source, tick "Read from file" and pick
state/current_card_p1.txt:The JSON files (
current_pN.json,events_pN.jsonl) have the rest of the card info, there are examples in the backend PR. README and translations explain the files.Tested on macOS with two players, toggling it on and off and restarting DRAW.