color coded % badges test

This commit is contained in:
shibbo 2024-07-24 21:17:49 -04:00
parent d66b37bb81
commit de6ec1703f
77 changed files with 104 additions and 89 deletions

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "Animation",
"message": "5.303%",
"color": "brightgreen"
"color": "yellow"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "AreaObj",
"message": "58.466%",
"color": "green"
"color": "yellow"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "AudioLib",
"message": "0.0%",
"color": "yellow"
"color": "red"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "Boss",
"message": "13.731%",
"color": "orange"
"color": "yellow"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "Camera",
"message": "34.126%",
"color": "red"
"color": "yellow"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "Demo",
"message": "3.744%",
"color": "D65076"
"color": "yellow"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "Effect",
"message": "2.218%",
"color": "pink"
"color": "yellow"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "Enemy",
"message": "3.92%",
"color": "magenta"
"color": "yellow"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "GameAudio",
"message": "0.0%",
"color": "teal"
"color": "red"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "Gravity",
"message": "100.0%",
"color": "maroon"
"color": "gold"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "LiveActor",
"message": "42.577%",
"color": "cyan"
"color": "yellow"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "Map",
"message": "17.787%",
"color": "silver"
"color": "yellow"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "MapObj",
"message": "32.92%",
"color": "tan"
"color": "yellow"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "NPC",
"message": "2.155%",
"color": "7fffd4"
"color": "yellow"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "NWC24",
"message": "0.0%",
"color": "ffff66"
"color": "red"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "NameObj",
"message": "33.21%",
"color": "indigo"
"color": "yellow"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "Player",
"message": "7.83%",
"color": "ff7f50"
"color": "yellow"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "RhythmLib",
"message": "1.266%",
"color": "088da5"
"color": "yellow"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "Ride",
"message": "6.181%",
"color": "ffff66"
"color": "yellow"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "Scene",
"message": "17.116%",
"color": "a0db8e"
"color": "yellow"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "Screen",
"message": "7.976%",
"color": "ff4040"
"color": "yellow"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "Speaker",
"message": "54.752%",
"color": "daa520"
"color": "yellow"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "System",
"message": "14.73%",
"color": "696969"
"color": "yellow"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "Util",
"message": "10.09%",
"color": "ff6666"
"color": "yellow"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "J2DGraph",
"message": "0.0%",
"color": "ffff66"
"color": "red"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "J3DGraphAnimator",
"message": "0.0%",
"color": "ffff66"
"color": "red"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "J3DGraphBase",
"message": "0.159%",
"color": "ffff66"
"color": "yellow"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "J3DGraphLoader",
"message": "0.0%",
"color": "ffff66"
"color": "red"
}

View File

@ -1,6 +1,6 @@
{
"schemaVersion": 1,
"label": "JAudio2",
"message": "0.0%",
"color": "ffff66"
"message": "19.737%",
"color": "yellow"
}

View File

@ -1,6 +1,6 @@
{
"schemaVersion": 1,
"label": "JGadget",
"message": "0.0%",
"color": "ffff66"
"message": "100.0%",
"color": "gold"
}

View File

@ -1,6 +1,6 @@
{
"schemaVersion": 1,
"label": "JKernel",
"message": "16.896%",
"color": "ffff66"
"message": "21.08%",
"color": "yellow"
}

View File

@ -1,6 +1,6 @@
{
"schemaVersion": 1,
"label": "JMath",
"message": "0.0%",
"color": "ffff66"
"message": "0.481%",
"color": "yellow"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "JParticle",
"message": "0.0%",
"color": "ffff66"
"color": "red"
}

View File

@ -1,6 +1,6 @@
{
"schemaVersion": 1,
"label": "JSupport",
"message": "32.049%",
"color": "ffff66"
"message": "57.634%",
"color": "yellow"
}

View File

@ -1,6 +1,6 @@
{
"schemaVersion": 1,
"label": "JUtility",
"message": "4.028%",
"color": "ffff66"
"message": "7.613%",
"color": "yellow"
}

View File

@ -1,6 +1,6 @@
{
"schemaVersion": 1,
"label": "MSL_C.PPCEABI.bare.H",
"message": "0.0%",
"color": "ffff66"
"message": "100.0%",
"color": "gold"
}

View File

@ -1,6 +1,6 @@
{
"schemaVersion": 1,
"label": "TRK_Hollywood_Revolution",
"message": "0.0%",
"color": "ffff66"
"message": "59.601%",
"color": "yellow"
}

View File

@ -1,6 +1,6 @@
{
"schemaVersion": 1,
"label": "RVLFaceLib",
"message": "0.0%",
"color": "ffff66"
"message": "100.0%",
"color": "gold"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "ai",
"message": "100.0%",
"color": "brightgreen"
"color": "gold"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "aralt",
"message": "0.0%",
"color": "green"
"color": "red"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "arc",
"message": "100.0%",
"color": "yellow"
"color": "gold"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "ax",
"message": "0.0%",
"color": "orange"
"color": "red"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "base",
"message": "100.0%",
"color": "D65076"
"color": "gold"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "bte",
"message": "0.0%",
"color": "pink"
"color": "red"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "db",
"message": "100.0%",
"color": "magenta"
"color": "gold"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "dsp",
"message": "100.0%",
"color": "teal"
"color": "gold"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "dvd",
"message": "100.0%",
"color": "maroon"
"color": "gold"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "esp",
"message": "100.0%",
"color": "cyan"
"color": "gold"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "euart",
"message": "100.0%",
"color": "silver"
"color": "gold"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "exi",
"message": "100.0%",
"color": "tan"
"color": "gold"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "fs",
"message": "100.0%",
"color": "indigo"
"color": "gold"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "gd",
"message": "2.159%",
"color": "7fffd4"
"color": "yellow"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "gx",
"message": "13.614%",
"color": "ff7f50"
"color": "yellow"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "ipc",
"message": "100.0%",
"color": "088da5"
"color": "gold"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "mem",
"message": "9.977%",
"color": "ffff66"
"color": "yellow"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "mtx",
"message": "0.0%",
"color": "a0db8e"
"color": "red"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "nand",
"message": "100.0%",
"color": "ff4040"
"color": "gold"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "net",
"message": "0.0%",
"color": "daa520"
"color": "red"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "nwc24",
"message": "5.584%",
"color": "696969"
"color": "yellow"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "os",
"message": "81.43%",
"color": "ff6666"
"color": "yellow"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "pad",
"message": "100.0%",
"color": "brown"
"color": "gold"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "rso",
"message": "0.0%",
"color": "588ec2"
"color": "red"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "sc",
"message": "71.656%",
"color": "a7e51c"
"color": "yellow"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "si",
"message": "100.0%",
"color": "3c316b"
"color": "gold"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "thp",
"message": "100.0%",
"color": "f78194"
"color": "gold"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "tpl",
"message": "100.0%",
"color": "e88c42"
"color": "gold"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "usb",
"message": "0.0%",
"color": "675a14"
"color": "red"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "vf",
"message": "0.0%",
"color": "b1ac82"
"color": "red"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "vi",
"message": "97.553%",
"color": "88eb04"
"color": "yellow"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "wenc",
"message": "0.0%",
"color": "d34feb"
"color": "red"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "wpad",
"message": "0.0%",
"color": "9197cd"
"color": "red"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "wud",
"message": "0.0%",
"color": "016eee"
"color": "red"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "Runtime.PPCEABI.H",
"message": "100.0%",
"color": "brightgreen"
"color": "gold"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "libnw4r_db",
"message": "100.0%",
"color": "green"
"color": "gold"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "libnw4r_math",
"message": "100.0%",
"color": "orange"
"color": "gold"
}

View File

@ -2,5 +2,5 @@
"schemaVersion": 1,
"label": "libnw4r_ut",
"message": "48.685%",
"color": "red"
"color": "yellow"
}

View File

@ -159,7 +159,7 @@ class Archive:
def getName(self):
return self.name
def generateJSONTag(lib, self, percent, color):
def generateJSONTag(self, percent, color):
json = []
json.append("{\n")
json.append("\t\"schemaVersion\": 1,\n")
@ -168,9 +168,12 @@ class Archive:
json.append(f"\t\"color\": \"{color}\"\n")
json.append("}")
with open(f"libs\\{lib}\\data\\json\\{self.name}.json", "w") as w:
w.writelines(json)
if self.parent != "Game":
with open(f"libs\\{self.parent}\\data\\json\\{self.name}.json", "w") as w:
w.writelines(json)
else:
with open(f"data\\json\\{self.name}.json", "w") as w:
w.writelines(json)
def generateMarkdown(self):
# first we are going to generate the tables for the object files themselves in the library
page = []
@ -327,6 +330,18 @@ for key in libraries:
game_funcs_total += numFuncs
libprog = (matchingSize / fullSize) * 100.0
lib_tag_color = "red"
if libprog == 100:
lib_tag_color = "gold"
elif libprog != 0:
lib_tag_color = "yellow"
elif libprog > 70 and libprog < 100:
lib_tag_color = "green"
arch.generateJSONTag(libprog, lib_tag_color)
archName = arch.getName()
progressPage.append(f"| [{archName}](https://github.com/shibbo/Petari/blob/master/docs/lib/{key}/{archName}.md) | {libprog}% |\n")