app-json.py: parse emoji status scores into digits

This commit is contained in:
3wc 2021-04-27 19:34:36 +02:00
parent 4aec218719
commit 0e28af9eb1

View File

@ -179,6 +179,15 @@ def get_app_metadata(app_path):
"rating": match.split(",")[1].strip(),
"source": match.split(",")[-1].replace("*", "").strip(),
}
elif title == "status":
value = {
"❶💚": 1,
"❷💛": 2,
"❸🍎": 3,
"❹💣": 4,
"?": 5,
"": 5
}[match.split(":")[-1].replace("*", "").strip()]
else:
value = match.split(":")[-1].replace("*", "").strip()