Browse Source

added name feature to updaterooms, to printcommands output and to printtags

master
alpcentaur 9 months ago
parent
commit
1f5b359c11
1 changed files with 10 additions and 7 deletions
  1. +10
    -7
      fdb_spider_interface.py

+ 10
- 7
fdb_spider_interface.py View File

@ -401,9 +401,10 @@ if __name__ == '__main__':
if user_input_list[0] == 'printtags': if user_input_list[0] == 'printtags':
try: try:
room_id_to_print_tags = user_input_list[1]
room_name_add_tags = user_input_list[1]
room_id_to_print_tags = name2id(room_name_add_tags)
except: except:
answer = "after the command printtags, the second argument has to be the room id.. use printrooms and look up the id of the room you want to print the tags"
answer = "after the command printtags, the second argument has to be the room name.. use printrooms and look up the id of the room you want to print the tags"
room_id_to_print_tags = 'NONE' room_id_to_print_tags = 'NONE'
if room_id_to_print_tags != 'NONE': if room_id_to_print_tags != 'NONE':
try: try:
@ -447,12 +448,12 @@ if __name__ == '__main__':
example : `deleteroom 6572012bebb39dd248d08320` example : `deleteroom 6572012bebb39dd248d08320`
----------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------
To print the tags of a room use To print the tags of a room use
command : `printtags <room-id>`
example : `printtags 6572012bebb39dd248d08320`
command : `printtags <room-name>`
example : `printtags test42`
----------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------
To add tags to the existing tags use To add tags to the existing tags use
command : `addtags <room-id> <tag-list-without-spaces>`
example : `addtags 6572012bebb39dd248d08320 ['tag1','tag2','tag3']`
command : `addtags <room-name> <tag-list-without-spaces>`
example : `addtags test42 ['tag1','tag2','tag3']`
""" """
@ -482,7 +483,9 @@ if __name__ == '__main__':
if user_input_list[0] == 'updaterooms': if user_input_list[0] == 'updaterooms':
try: try:
if len(user_input_list[1]) >= 1: if len(user_input_list[1]) >= 1:
room_to_update = user_input_list[1]
room_name_to_update = user_input_list[1]
room_to_update = name2id(room_name_to_update)
#room_to_update = user_input_list[1]
except Exception as e: except Exception as e:
room_to_update = 'NONE' room_to_update = 'NONE'
room_list = [] room_list = []

Loading…
Cancel
Save