Compare commits

..

No commits in common. "218626d316ce7594be240bb67b49796bf21af004" and "e414f6342565635d8aaeea7240a6bd775e12d805" have entirely different histories.

5 changed files with 0 additions and 23 deletions

View File

@ -1,23 +0,0 @@
from discord_webhook import DiscordWebhook
from picamera import PiCamera
from time import sleep
def get_uptime():
with open('/proc/uptime', 'r') as f:
uptime_seconds = float(f.readline().split()[0])
return uptime_seconds
webhookURL = "https://discord.com/api/webhooks/856609966404534272/TR9tnLq2sIGZoOeADNswmGRNlzBcqM5aKihfU6snVTP9WhSSoVVvi7nT6i-ZfZS7Hcqm"
webhook = DiscordWebhook(url=webhookURL, content="Uptime: " + str( round( ((get_uptime() / 60) / 60 ), 2 )) + " hours")
camera = PiCamera()
sleep(3) # let iso settle out
camera.capture('still.jpg')
with open("still.jpg", "rb") as f:
webhook.add_file(file=f.read(), filename='still.jpg')
response = webhook.execute() # Hit send