From 1f5b359c111a1314c606ab11db64962a91589c65 Mon Sep 17 00:00:00 2001 From: alpcentaur Date: Tue, 6 Feb 2024 15:29:47 +0000 Subject: [PATCH] added name feature to updaterooms, to printcommands output and to printtags --- fdb_spider_interface.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/fdb_spider_interface.py b/fdb_spider_interface.py index 4621a61..66653a3 100644 --- a/fdb_spider_interface.py +++ b/fdb_spider_interface.py @@ -401,9 +401,10 @@ if __name__ == '__main__': if user_input_list[0] == 'printtags': 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: - 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' if room_id_to_print_tags != 'NONE': try: @@ -447,12 +448,12 @@ if __name__ == '__main__': example : `deleteroom 6572012bebb39dd248d08320` ----------------------------------------------------------------------------------------- To print the tags of a room use - command : `printtags ` - example : `printtags 6572012bebb39dd248d08320` + command : `printtags ` + example : `printtags test42` ----------------------------------------------------------------------------------------- To add tags to the existing tags use - command : `addtags ` - example : `addtags 6572012bebb39dd248d08320 ['tag1','tag2','tag3']` + command : `addtags ` + example : `addtags test42 ['tag1','tag2','tag3']` """ @@ -482,7 +483,9 @@ if __name__ == '__main__': if user_input_list[0] == 'updaterooms': try: 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: room_to_update = 'NONE' room_list = []