diff --git a/.github/assets/banner.jpg b/.github/assets/banner.jpg deleted file mode 100644 index 9293fd7..0000000 Binary files a/.github/assets/banner.jpg and /dev/null differ diff --git a/.github/assets/banner_1.jpg b/.github/assets/banner_1.jpg new file mode 100644 index 0000000..4595546 Binary files /dev/null and b/.github/assets/banner_1.jpg differ diff --git a/.github/assets/banner_2.jpg b/.github/assets/banner_2.jpg new file mode 100644 index 0000000..44b0029 Binary files /dev/null and b/.github/assets/banner_2.jpg differ diff --git a/.github/assets/banner_3.jpg b/.github/assets/banner_3.jpg new file mode 100644 index 0000000..b123c01 Binary files /dev/null and b/.github/assets/banner_3.jpg differ diff --git a/.github/scripts/banner.txt b/.github/scripts/banner.txt new file mode 100644 index 0000000..c227083 --- /dev/null +++ b/.github/scripts/banner.txt @@ -0,0 +1 @@ +0 \ No newline at end of file diff --git a/.github/scripts/post.py b/.github/scripts/post.py index e9da2a1..5f80049 100644 --- a/.github/scripts/post.py +++ b/.github/scripts/post.py @@ -149,6 +149,23 @@ def bold(text1, text2): message = "" + text1 + "" + text2 return message +def banner(): + with open(".github/scripts/banner.txt", "r+") as f: + b = int(f.read()) + if b == 0: + f.seek(0) + f.write('1') + return "1" + elif b == 1: + f.seek(0) + f.write('2') + return "2" + elif b == 2: + f.seek(0) + f.write('0') + return "3" + else: + print("ayo code died") # Prepare in the format needed def cook_content(information): @@ -188,7 +205,7 @@ def update_json(information): old = read_old() if len(get_diff(new, old)) == 0: - print("All Updated\nNothing to do\nExiting") + print("Al4 Updated\nNothing to do\nExiting") exit() print(get_diff(new, old)) @@ -197,9 +214,10 @@ def update_json(information): for i in get_diff(new, old): print(i) info = get_info(i) + ban_n = banner() bot.send_sticker(CHAT_ID, STICKER_ID) #send_mes(cook_content(info)) - send_photo(".github/assets/banner.jpg", cook_content(info)) + send_photo(f".github/assets/banner_{ban_n}.jpg", cook_content(info)) if info["updater"]: update_json(info) commit_message = "Update new IDs and push OTA"