General Cube List Format Converter (For MTG Forge, Card Orders, etc)

(I use Forge to playtest my cube list against AI, and I was getting tired of having to manually type the 1s in front of each card in the list to meet the format requirements for the program, so out of laziness I made this)

This program converts a cube list formatted as such:
  • Law-Rune Enforcer
  • Law-Rune Enforcer
  • Dauntless Bodyguard
  • Skymarcher Aspirant
To one formatted like this (or any other prefix of your choosing):
  • 2 Law-Rune Enforcer
  • 1 Dauntless Bodyguard
  • 1 Skymarcher Aspirant
repl.it project link: https://repl.it/@CarterBrown/Cube-Deck-Formatter

Instructions:
1. Export your cube list to a plain text file using CubeTutor.
2. Copy all the text from the file, paste it into the file titled "in.txt" (File Explorer on the left).
3. Hit "Run", located at the top of the screen. Give the site a few seconds to get ready.
4. The program will prompt you to enter the desired prefix.

Format:
  • If you wish for the program to format your list as shown above (multiples of each card grouped together, printed line-by-line as "N <cardname>", where N is the number of copies), simply hit Enter, and the list will be outputted as such.
  • If you need your list formatted as above, but the prefix is something else (e.g. 1x cardname), simply type the desired prefix with "N" (a capital letter N) replacing any instance of the number of copies of the card (e.g. "Nx" for 1x, 2x, etc), and hit Enter.
  • If all the cards in your list need the exact same prefix (no grouping of multiples), simply type that prefix (given that it contains no capital N's... lazy programming but whatever) and hit Enter.
5. If all goes well, "Done." should appear in the console, and the formatted list should now be in "out.txt". Copy/Paste that list to the desired location, and you're done!

It's no marvel of technology, but I thought that some of you might find this useful if you use Forge, are trying to mass-entry an order of your cube, or if you use any other cube-list managing website that requires you to format your lists as such.

If you have any problems/requests, let me know, I'd be glad to help.
 

Onderzeeboot

Ecstatic Orb
The newest version of Notepad++ can help anyone out who doesn't run a singleton cube!

1. Copy/Paste the list in out.txt into Notepad++.
2. Hit Ctrl+H (on PC, no idea what the shortcut is on Macs, but you're looking for Search+Replace).
3. Select the option 'Regular expression' in the bottom left corner of the dialog.
4. Make sure the option ". matches newline" is not checked!
5. Type "1 (.*)\r\n1 \1" (without the quotes) in the field "Find what :".
6. Type "2 \1" (without the quotes) in the field "Replace with :".

Bonus for those who really go the extra mile to break singleton (this is untested, but should work unless you clicked around in the file first and somehow ended up somewhere between duplicate lines before running the search+replace commands)...

6. If you're running three-offs, type "2 (.*)\r\n1 \1" (without the quotes) in the field "Find what :".
7. Type "3 \1" (without the quotes) in the field "Replace with :".
8. If you're running four-offs, type "2 (.*)\r\n2 \1" (without the quotes) in the field "Find what :".
9. Type "4 \1" (without the quotes) in the field "Replace with :".
10. If you're running five-offs, type "4 (.*)\r\n1 \1" (without the quotes) in the field "Find what :".
11. Type "5 \1" (without the quotes) in the field "Replace with :".
12. If you're running six-offs, type "4 (.*)\r\n2 \1" (without the quotes) in the field "Find what :".
13. Type "6 \1" (without the quotes) in the field "Replace with :".
14. If you're running seven-offs, you did this to yourself!

Also, stuff like this deserves to be pinned somewhere. Great work Hillstyle!
 
Top