From c6413e5c0d2f04232e37391c8b5b62277562d065 Mon Sep 17 00:00:00 2001 From: Brett Weiland Date: Mon, 2 Nov 2020 03:50:59 -0600 Subject: deleted: color_test.py modified: post_bot.py new file: push_script.sh deleted: test_page --- color_test.py | 15 - post_bot.py | 10 +- push_script.sh | 4 + test_page | 3789 -------------------------------------------------------- 4 files changed, 6 insertions(+), 3812 deletions(-) delete mode 100755 color_test.py create mode 100755 push_script.sh delete mode 100644 test_page diff --git a/color_test.py b/color_test.py deleted file mode 100755 index 288707a..0000000 --- a/color_test.py +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env python3 - -color = 0x0000ff -def rainbow_gen(color): - if (color & 0x0000ff == 0xff) and (color ^ 0xff0000 == 0xff) and (color ^ 0x00ff00 < 0xff): - color += 0x100 - color -= 1 - print("test") - - return color - -while True: - color = rainbow_gen(color) - print(hex(color)) - diff --git a/post_bot.py b/post_bot.py index 3ba584f..ce189ff 100755 --- a/post_bot.py +++ b/post_bot.py @@ -73,7 +73,7 @@ rs.post('https://recolor.me/topic/1557621', data={ 'page':'topic', 'action':'reply', 'topic_id':'1557621', - 'reply_message':"Server is booting, or service has restarted.\nThe time is {}.\nExistance started {} seconds ago.".format(datetime.now(timezone.utc), datetime.now(timezone.utc).timestamp()), + 'reply_message':"Server is rebooting, or service has restarted.\nThe time is {} UTC.\nExistence started {} seconds ago.".format(datetime.now(timezone.utc), int(datetime.now().timestamp())), 'box_color':'#0000ff', 'post_color':'#0', 'post_style':'0' @@ -85,12 +85,6 @@ while True: current_time = datetime.now(timezone.utc) desired_time = current_time.replace(day=current_time.day, hour=6, minute=1, second=0, microsecond=0) + timedelta(days=1) print("starting next run at {}".format(str(desired_time))) - cap_thread = Timer((desired_time - current_time).total_seconds() + 1, acheive_limit) + cap_thread = Timer((desired_time - current_time).total_seconds()+1, acheive_limit) cap_thread.start() cap_thread.join() - - -#usually resets at 11 - - - diff --git a/push_script.sh b/push_script.sh new file mode 100755 index 0000000..f941d07 --- /dev/null +++ b/push_script.sh @@ -0,0 +1,4 @@ +#!/bin/bash +echo "put post_bot.py /root/scripts/python" | sftp root@bpcspace.com +ssh root@bpcspace.com "chmod 755 /root/scripts/python/post_bot.py; systemctl reload recolor_bot; systemctl restart recolor_bot; systemctl status recolor_bot" + diff --git a/test_page b/test_page deleted file mode 100644 index 709cc21..0000000 --- a/test_page +++ /dev/null @@ -1,3789 +0,0 @@ -HTTP/1.1 200 OK - -Date: Mon, 02 Nov 2020 03:36:31 GMT - -Content-Type: text/html; charset=UTF-8 - -Connection: close - -X-Powered-By: PHP/7.0.33 - -Expires: Thu, 19 Nov 1981 08:52:00 GMT - -Cache-Control: no-store, no-cache, must-revalidate - -Pragma: no-cache - -Pragma: public - -CF-Cache-Status: DYNAMIC - -cf-request-id: 0628a033320000eca628294000000001 - -Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct" - -Report-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report?s=I%2FnM1I7XsNBQajStTTluEJdN2ScNg%2BU%2FGukz0JCSp71g4yJ4KFfO%2F9pOAeC843pdrXWU0LeNeB8c4YsZ%2FexKgqfL1hTL3G85LJL7"}],"group":"cf-nel","max_age":604800} - -NEL: {"report_to":"cf-nel","max_age":604800} - -Server: cloudflare - -CF-RAY: 5ebacfcb8c96eca6-DFW - -Content-Length: 229284 - - - - - - -Account Settings < recolor.me - - - - - - - - - - - - - - - - - - - -

recolor.me

- -
- - -
- -
-
- - - - - - - -
Loading...
- - -- cgit v1.2.3