made tag search case insensitive, all is converted to lowercase
This commit is contained in:
parent
e7272bf6f9
commit
acc00d1ccd
2 changed files with 9 additions and 3 deletions
|
@ -161,8 +161,11 @@ if __name__ == '__main__':
|
|||
print(room_fdb, i)
|
||||
for key in data[room_fdb][i]:
|
||||
contains_tag = False
|
||||
name_data_lower = [word.lower() for word in data[room_fdb][i][key]["name"].split(' ')]
|
||||
info_data_lower = [word.lower() for word in data[room_fdb][i][key]["info"].split(' ')]
|
||||
text_data_lower = [word.lower() for word in data[room_fdb][i][key]["text"].split(' ')]
|
||||
for tag in eval(room_tags):
|
||||
if tag in (data[room_fdb][i][key]["name"].split(' ') or data[room_fdb][i][key]["info"].split(' ') or data[room_fdb][i][key]["text"].split(' ')):
|
||||
if tag.lower() in (name_data_lower or info_data_lower or text_data_lower):
|
||||
contains_tag = True
|
||||
if contains_tag == True:
|
||||
|
||||
|
@ -403,8 +406,11 @@ if __name__ == '__main__':
|
|||
print(room_fdb, i)
|
||||
for key in data[room_fdb][i]:
|
||||
contains_tag = False
|
||||
name_data_lower = [word.lower() for word in data[room_fdb][i][key]["name"].split(' ')]
|
||||
info_data_lower = [word.lower() for word in data[room_fdb][i][key]["info"].split(' ')]
|
||||
text_data_lower = [word.lower() for word in data[room_fdb][i][key]["text"].split(' ')]
|
||||
for tag in eval(room_tags):
|
||||
if tag in (data[room_fdb][i][key]["name"].split(' ') or data[room_fdb][i][key]["info"].split(' ') or data[room_fdb][i][key]["text"].split(' ')):
|
||||
if tag.lower() in (name_data_lower or info_data_lower or text_data_lower):
|
||||
contains_tag = True
|
||||
if contains_tag == True:
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
printtags 6576ec7cebb39dd248d19f34§%§%b53Pv64ZFr65Q44Qy
|
||||
updaterooms 657b0a50ebb39dd248d2e11b§%§%4pTTKiFWfhTg24hGb
|
Loading…
Reference in a new issue