From fde13a50e67bc1fc283d4a66b590307f3274c1ab Mon Sep 17 00:00:00 2001 From: Miryuni <ercol@outlook.com> Date: Sat, 14 Nov 2020 14:20:58 +0100 Subject: [PATCH] Green colors when updated --- updatePacks.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/updatePacks.py b/updatePacks.py index ac85991..fe9bded 100644 --- a/updatePacks.py +++ b/updatePacks.py @@ -42,10 +42,13 @@ elif sticker_index == 0: else: json_pack['stickers'][sticker_index-1]['body'] = new_body # Print the body of all the stickers - print(Fore.GREEN + 'Updated!') + print(Fore.GREEN + 'Updated!'+ Style.RESET_ALL) print("New sticker pack:") for i in range(nb_stickers): - print("\t "+str(i+1) + ". " + json_pack['stickers'][i]['body']) + if i == sticker_index-1: + print("\t "+Fore.GREEN+str(i+1) + ". " + json_pack['stickers'][i]['body']+Style.RESET_ALL) + else: + print("\t "+str(i+1) + ". " + json_pack['stickers'][i]['body']) out_file = open(sys.argv[1], 'w') json.dump(json_pack, out_file, indent = 3) -- GitLab