Generate metagame URL from enum

This commit is contained in:
The Magician 2024-03-25 18:42:58 +00:00
parent 81f997e276
commit 54422261ad
1 changed files with 13 additions and 2 deletions

View File

@ -1,9 +1,9 @@
#!/usr/bin/python3
from enum import Enum
from enum import Enum, StrEnum
from dataclasses import dataclass
class Format(Enum):
class Format(StrEnum):
STANDARD = "standard"
MODERN = "modern"
PIONEER = "pioneer"
@ -33,3 +33,14 @@ class Archetype():
metagamePercentage: int
numberOfDecks: 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()