MCPcopy Create free account
hub / github.com/Card-Forge/forge / hasOracleLine

Function hasOracleLine

forge-gui/tools/jsonOraclizer.py:102–120  ·  view source on GitHub ↗
(cardFile, lines, offlineSource=True)

Source from the content-addressed store, hash-verified

100
101
102def hasOracleLine(cardFile, lines, offlineSource=True):
103 # Start parsing the rest of the data file
104 hasOracle = False
105
106 for line in cardFile.readlines():
107 line = line.strip()
108 # Skip empty lines
109 if line == '':
110 continue
111
112 if line.find(oracleStr) != -1:
113 hasOracle = True
114 break
115
116 else:
117 lines += line + '\n'
118
119 cardFile.close()
120 return hasOracle, lines
121
122# parse cardsfolder for Card Lines and Rarity/Picture SVars. Filling in any gaps
123for root, dirnames, filenames in os.walk(folder):

Callers 1

jsonOraclizer.pyFile · 0.85

Calls 2

findMethod · 0.65
closeMethod · 0.65

Tested by

no test coverage detected