Black formatter

This commit is contained in:
3wc 2021-08-11 13:41:31 +02:00
parent 90da68359a
commit 4055530baf

View File

@ -21,7 +21,7 @@ def main():
messages = list(message_reader)
unread = list(filter(lambda x: '\\Seen' not in x.flags, messages))
unread = list(filter(lambda x: "\\Seen" not in x.flags, messages))
dates = [m.date.replace(tzinfo=None) for m in messages]
@ -34,17 +34,19 @@ def main():
count = len(dates)
count_unread = len(unread)
output = f'''\
output = f"""\
booping ur snoots :point_right:
total emails: **{count}**
unread: **{count_unread}**
median email: recevied **{median_date}**, {median_delta} ago
oldest email: recevied **{oldest_date}**, {oldest_delta} ago
'''
"""
print("sendin boops")
r = requests.post(os.getenv("ROCKETCHAT_HOOK_URL"), json={
r = requests.post(
os.getenv("ROCKETCHAT_HOOK_URL"),
json={
"alias": "mailboop",
"emoji": ":snake:",
"text": output,
@ -55,7 +57,8 @@ oldest email: recevied **{oldest_date}**, {oldest_delta} ago
# # "image_url": "/images/integration-attachment-example.png",
# "color": "#764FA5"
# }]
})
},
)
if __name__ == "__main__":