Generate metagame URL from enum
This commit is contained in:
parent
81f997e276
commit
54422261ad
|
@ -1,9 +1,9 @@
|
||||||
#!/usr/bin/python3
|
#!/usr/bin/python3
|
||||||
|
|
||||||
from enum import Enum
|
from enum import Enum, StrEnum
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
class Format(Enum):
|
class Format(StrEnum):
|
||||||
STANDARD = "standard"
|
STANDARD = "standard"
|
||||||
MODERN = "modern"
|
MODERN = "modern"
|
||||||
PIONEER = "pioneer"
|
PIONEER = "pioneer"
|
||||||
|
@ -33,3 +33,14 @@ class Archetype():
|
||||||
metagamePercentage: int
|
metagamePercentage: int
|
||||||
numberOfDecks: int
|
numberOfDecks: int
|
||||||
tabletopCost: int
|
tabletopCost: int
|
||||||
|
|
||||||
|
def get_archetypes_for_format(mformat: Format) -> list[Archetype]:
|
||||||
|
url = "https://www.mtggoldfish.com/metagame/" + mformat + "/full#paper"
|
||||||
|
print(url)
|
||||||
|
|
||||||
|
def main():
|
||||||
|
archetypes = get_archetypes_for_format(Format.PAUPER)
|
||||||
|
print(archetypes)
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
|
|
Loading…
Reference in New Issue