30 lines
714 B
Python
30 lines
714 B
Python
import re
|
|
|
|
|
|
def humanize_tags_from_json(value, default):
|
|
if value != "":
|
|
output = str()
|
|
tags = value.split()
|
|
|
|
for t in tags:
|
|
output += f"{re.sub('_\\(.*', '', t)}, "
|
|
output = output[:-2]
|
|
|
|
return output
|
|
return default
|
|
|
|
|
|
def format_rating(value):
|
|
match value:
|
|
case "g":
|
|
# Negative Squared Latin Capital Letter G
|
|
return "๐
ถ"
|
|
case "s":
|
|
# Negative Squared Latin Capital Letter S
|
|
return "๐"
|
|
case "q":
|
|
# Negative Squared Latin Capital Letter Q
|
|
return "๐"
|
|
case "e":
|
|
# Negative Squared Latin Capital Letter E
|
|
return "๐
ด"
|