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

This commit is contained in:
alpcentaur 2024-02-06 15:29:47 +00:00
parent d61f595c9f
commit 1f5b359c11

View file

@ -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 <room-id>`
example : `printtags 6572012bebb39dd248d08320`
command : `printtags <room-name>`
example : `printtags test42`
-----------------------------------------------------------------------------------------
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':
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 = []