Compare commits

..

No commits in common. "master" and "0.5.1" have entirely different histories.

2 changed files with 3 additions and 38 deletions

View file

@ -1,29 +0,0 @@
"i'm so tired" software license 1.0
copyright (c) 2024 Trysdyn Black
this is anti-capitalist, anti-bigotry software, made by people who are tired of ill-intended organisations and individuals, and would rather not have those around their creations.
permission is granted, free of charge, to any user (be they a person or an organisation) obtaining a copy of this software, to use it for personal, commercial, or educational purposes, subject to the following conditions:
1. the above copyright notice and this permission notice shall be included in all copies or modified versions of this software.
2. the user is one of the following:
a. an individual person, labouring for themselves
b. a non-profit organisation
c. an educational institution
d. an organization that seeks shared profit for all of its members, and allows non-members to set the cost of their labor
3. if the user is an organization with owners, then all owners are workers and all workers are owners with equal equity and/or equal vote.
4. if the user is an organization, then the user is not law enforcement or military, or working for or under either.
5. the user does not use the software for ill-intentioned reasons, as determined by the authors of the software. said reasons include but are not limited to:
a. bigotry, including but not limited to racism, xenophobia, homophobia, transphobia, ableism, sexism, antisemitism, religious intolerance
b. pedophilia, zoophilia, and/or incest
c. support for cops and/or the military
d. any blockchain-related technology, including but not limited to cryptocurrencies
6. the user does not promote or engage with any of the activities listed in the previous item, and is not affiliated with any group that promotes or engages with any of such activities.
this software is provided as is, without any warranty or condition. in no event shall the authors be liable to anyone for any damages related to this software or this license, under any kind of legal claim.

12
main.py
View file

@ -43,7 +43,6 @@ class Parser: # noqa: PLR0904
if "(Level " in line: if "(Level " in line:
name = line.split(" (")[0] name = line.split(" (")[0]
info["stats"]["level"] = int(line.split("(Level ")[1][:-1]) info["stats"]["level"] = int(line.split("(Level ")[1][:-1])
info["name"] = name
# Stat chart rows # Stat chart rows
elif line.startswith("|"): elif line.startswith("|"):
for stat in line[1:-1].split("|"): for stat in line[1:-1].split("|"):
@ -61,11 +60,6 @@ class Parser: # noqa: PLR0904
weak_text = "WEAK: " weak_text = "WEAK: "
info["nullifies"] = null_text.split(": ")[1].split(", ") info["nullifies"] = null_text.split(": ")[1].split(", ")
info["weak"] = weak_text.split(": ")[1].split(", ") info["weak"] = weak_text.split(": ")[1].split(", ")
# Due to split oddness we can populate a blank string into weakness
# Delete it if we did.
if info["weak"] == [""]:
del info["weak"]
# Specials are name=>desc as k:v # Specials are name=>desc as k:v
# I *think* you can only have one special... # I *think* you can only have one special...
elif line.startswith("SPECIAL"): elif line.startswith("SPECIAL"):
@ -145,7 +139,6 @@ class Parser: # noqa: PLR0904
# Name # Name
if line[0:2].isdigit(): if line[0:2].isdigit():
name = line[4:] name = line[4:]
info["name"] = name
# Stat chart rows: BCEX Version only # Stat chart rows: BCEX Version only
elif line.startswith("|"): elif line.startswith("|"):
@ -424,7 +417,7 @@ class Parser: # noqa: PLR0904
elif line.strip(): elif line.strip():
dance = line.strip() dance = line.strip()
if dance not in result: if dance not in result:
result[dance] = {"name": dance} result[dance] = {}
return result return result
@ -452,7 +445,7 @@ class Parser: # noqa: PLR0904
elif next_esper: elif next_esper:
esper = line.strip() esper = line.strip()
if esper not in result: if esper not in result:
result[esper] = {"learnset": {}, "name": esper} result[esper] = {"learnset": {}}
next_esper = False next_esper = False
# Any line with ":" is a k=v we should just shove into the dict # Any line with ":" is a k=v we should just shove into the dict
elif ": " in line: elif ": " in line:
@ -508,6 +501,7 @@ class Parser: # noqa: PLR0904
need. need.
""" """
result = {} result = {}
mode = None
for line in data.split("\n"): for line in data.split("\n"):
if "-----" in line or not line.strip(): if "-----" in line or not line.strip():