Browse Source

made tag search case insensitive, all is converted to lowercase

master
alpcentaur 11 months ago
parent
commit
acc00d1ccd
2 changed files with 9 additions and 3 deletions
  1. +8
    -2
      fdb_spider_interface.py
  2. +1
    -1
      new_message_file.txt

+ 8
- 2
fdb_spider_interface.py View File

@ -161,8 +161,11 @@ if __name__ == '__main__':
print(room_fdb, i) print(room_fdb, i)
for key in data[room_fdb][i]: for key in data[room_fdb][i]:
contains_tag = False 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): 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 contains_tag = True
if contains_tag == True: if contains_tag == True:
@ -403,8 +406,11 @@ if __name__ == '__main__':
print(room_fdb, i) print(room_fdb, i)
for key in data[room_fdb][i]: for key in data[room_fdb][i]:
contains_tag = False 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): 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 contains_tag = True
if contains_tag == True: if contains_tag == True:

+ 1
- 1
new_message_file.txt View File

@ -1 +1 @@
printtags 6576ec7cebb39dd248d19f34§%§%b53Pv64ZFr65Q44Qy
updaterooms 657b0a50ebb39dd248d2e11b§%§%4pTTKiFWfhTg24hGb

Loading…
Cancel
Save