()
| 107 | |
| 108 | |
| 109 | def initializeForgeCards(): |
| 110 | #Parse Forge |
| 111 | print("Parsing Forge") |
| 112 | cardsfolderLocation = os.path.join(resDir, 'cardsfolder') |
| 113 | for root, dirnames, filenames in os.walk(cardsfolderLocation): |
| 114 | for fileName in fnmatch.filter(filenames, '*.txt'): |
| 115 | with open(os.path.join(root, fileName)) as currentForgeCard : |
| 116 | # Check all names for this card |
| 117 | name = '' |
| 118 | split = False |
| 119 | for line in currentForgeCard.readlines(): |
| 120 | if line.startswith("Name:"): |
| 121 | if split: |
| 122 | name += ' // ' |
| 123 | |
| 124 | if not name or split: |
| 125 | name += line[5:].rstrip().lower() |
| 126 | |
| 127 | elif line.startswith("AlternateMode") and 'Split' in line: |
| 128 | split = True |
| 129 | |
| 130 | forgeCards.append(name) |
| 131 | |
| 132 | def initializeFormats(): |
| 133 | formats = {} |
no test coverage detected