From 1502d1b4dde319b3ac7046fc79dfa656aa845c9b Mon Sep 17 00:00:00 2001 From: Unbewohnte Date: Tue, 29 Jun 2021 14:11:25 +0300 Subject: [PATCH] Directory is now sorted --- vkImageSender/VkImageSender.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vkImageSender/VkImageSender.py b/vkImageSender/VkImageSender.py index 4b74c6d..edac6c5 100644 --- a/vkImageSender/VkImageSender.py +++ b/vkImageSender/VkImageSender.py @@ -17,6 +17,8 @@ def sendImages(img_dir = ".", ID = 0, IS_GROUP_CHAT = False, TOKEN = ""): vk = vk_api.VkApi(token = TOKEN).get_api() files = os.listdir(img_dir) + files.sort() + counter = 1 for filename in files: @@ -32,7 +34,7 @@ def sendImages(img_dir = ".", ID = 0, IS_GROUP_CHAT = False, TOKEN = ""): upload_img = upload.photo_messages(photos = path_to_image)[0] # each message will contain "Counter : {number_of_}" - MESSAGE = "Counter : ┃{}┃ The next appr. at ~ ┃{}┃".format(counter, + MESSAGE = "▶ Counter ┃{}┃ The next appr. at ~ ┃{}┃ ◀".format(counter, datetime.datetime.now() + datetime.timedelta(seconds=4)) # sending print("• {}: Sending {}...".format(counter,filename))