From 823ea0af2079f93c0dcd3162bac677d9760b7996 Mon Sep 17 00:00:00 2001 From: Maxmtg Date: Tue, 7 May 2013 13:35:34 +0000 Subject: [PATCH] restore old-fashioned formats.txt for PerSetTracking.py the python script updated as well --- .gitattributes | 1 + tools/PerSetTracking.py | 7 ++++--- tools/formats.txt | 5 +++++ 3 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 tools/formats.txt diff --git a/.gitattributes b/.gitattributes index 5de3e88413c..8c6b603b7fc 100644 --- a/.gitattributes +++ b/.gitattributes @@ -14627,6 +14627,7 @@ src/test/java/forge/model/FModelTest.java -text tools/PerSetTracking.py svneol=native#text/x-python tools/assignSetInfo.py svneol=native#text/x-python tools/cardTemplateScript.py svneol=native#text/x-python +tools/formats.txt -text tools/guilds.xlsx -text tools/mtg-data.txt svneol=native#text/plain tools/mtgdata-sets-to-forge.txt svneol=native#text/plain diff --git a/tools/PerSetTracking.py b/tools/PerSetTracking.py index 338d1431c8f..9fc0efc3c01 100755 --- a/tools/PerSetTracking.py +++ b/tools/PerSetTracking.py @@ -7,7 +7,7 @@ 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') + formatLocation = os.path.join(sys.path[0], 'formats.txt') with open(formatLocation) as formatFile: formats = formatFile.readlines() @@ -201,12 +201,13 @@ if __name__ == '__main__': del currentImplemented[:] #sort sets by percentage completed - totalDataList = sorted(totalData.items(), key=lambda (key,entry): entry[3], reverse=True) + totalDataList = sorted(totalData.items(), key=lambda k: k[1][3], reverse=True) totalPercentage = 0 totalMissing = 0 totalImplemented = 0 fullTotal = 0 + 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 : @@ -223,4 +224,4 @@ if __name__ == '__main__': printCardSet(standardImplemented, standardMissing, "FormatStandard.txt", setCoverage=standardSets) printDistinctOracle(allMissing, "DistinctOracle.txt") - print "Done!" + print ("Done!") diff --git a/tools/formats.txt b/tools/formats.txt new file mode 100644 index 00000000000..eb53be4e562 --- /dev/null +++ b/tools/formats.txt @@ -0,0 +1,5 @@ +Name:Standard|Sets:ISD, DKA, AVR, M13, RTR, GTC, DGM +Name:Extended|Sets:ZEN, WWK, ROE, M11, SOM, MBS, NPH, M12, ISD, DKA, AVR, M13, RTR, GTC, DGM|Banned:Stoneforge Mystic; Jace, the Mind Sculptor; Ponder; Preordain; Mental Misstep +Name:Modern|Sets:8ED, MRD, DST, 5DN, CHK, BOK, SOK, 9ED, RAV, GPT, DIS, CSP, TSP, PLC, FUT, 10E, LRW, EVE, SHM, MOR, ALA, CFX, ARB, M10, ZEN, WWK, ROE, M11, SOM, MBS, NPH, M12, ISD, DKA, AVR, M13, RTR, GTC, DGM +Name:Legacy +Name:Vintage \ No newline at end of file