mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
make tool scripts working-directory agnostic
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
pathToMtgData = "mtg-data.txt"
|
||||
|
||||
############IMPLEMENTATION FOLLOWS############
|
||||
import os,sys,fnmatch,re
|
||||
|
||||
pathToMtgData = os.path.join(sys.path[0], "mtg-data.txt")
|
||||
|
||||
def getSetByFormat(requestedFormat):
|
||||
# Parse out Standard sets from the Format file
|
||||
formatLocation = os.path.join(sys.path[0], '..', 'res', 'blockdata', 'formats.txt')
|
||||
@@ -207,7 +207,7 @@ if __name__ == '__main__':
|
||||
totalMissing = 0
|
||||
totalImplemented = 0
|
||||
fullTotal = 0
|
||||
with open(sys.path[0] + os.sep + "PerSetTrackingResults" + os.sep + "CompleteStats.txt", "w") as statsfile:
|
||||
with open(os.path.join(sys.path[0], "PerSetTrackingResults", "CompleteStats.txt"), "w") as statsfile:
|
||||
statsfile.write("Set: Implemented (Missing) / Total = Percentage Implemented\n")
|
||||
for k,dataKey in totalDataList :
|
||||
totalImplemented += dataKey[0]
|
||||
|
||||
Reference in New Issue
Block a user