Updated 'Copy Collection to Clipboard' menu item in the inventory view#10925
Open
mrstarbuck007 wants to merge 10 commits into
Open
Updated 'Copy Collection to Clipboard' menu item in the inventory view#10925mrstarbuck007 wants to merge 10 commits into
mrstarbuck007 wants to merge 10 commits into
Conversation
… Outputs the entire card collection, minus any cards in Auto-Sell, to the clipboard in Moxfield CSV format for easy importing.
Jetz72
reviewed
Jun 8, 2026
Jetz72
left a comment
Contributor
There was a problem hiding this comment.
Seems like it'd be easier and more accurate to output the edition code and collector number rather than going through and grouping them by set.
Comment on lines
+515
to
+518
| ItemPool<PaperCard> autoSellCards = AdventurePlayer.current().getAutoSellCards(); | ||
| CardPool playedCards = AdventurePlayer.current().getCards().getFilteredPool(card -> !autoSellCards.contains(card)); | ||
| menu.addItem(new FMenuItem(Forge.getLocalizer().getMessage("btnCopyCollectionToClipboard"), Forge.hdbuttons ? FSkinImage.HDEXPORT : FSkinImage.BLANK, e1 -> FDeckViewer.copyCollectionToClipboard(playedCards))); | ||
|
|
Contributor
There was a problem hiding this comment.
Should build playedCards when clicking the button rather than when opening the menul
Comment on lines
+77
to
+81
| regexCardName = regexA.matcher(regexCardName).replaceAll("a"); | ||
| regexCardName = regexE.matcher(regexCardName).replaceAll("e"); | ||
| regexCardName = regexI.matcher(regexCardName).replaceAll("i"); | ||
| regexCardName = regexO.matcher(regexCardName).replaceAll("o"); | ||
| regexCardName = regexU.matcher(regexCardName).replaceAll("u"); |
Contributor
There was a problem hiding this comment.
We do have StringUtils::stripAccents, but why wouldn't we want to export the oracle name?
Author
There was a problem hiding this comment.
The Moxfield csv import can't handle accented characters so we need to replace them with the ASCII equivalents.
…fies collector number and foil too
Contributor
|
How about we don't try optimizing generic features for site-specific quirks? that seems like a neverending mess |
Author
|
Because otherwise the feature is not very useful?
|
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.
Outputs the entire card collection, minus any cards in Auto-Sell, to the clipboard in Moxfield CSV format for easy importing.