From 10c19997d539e7f17a0e5f2be38747fde9a17e73 Mon Sep 17 00:00:00 2001 From: youshitsune Date: Fri, 9 Jun 2023 08:33:24 +0200 Subject: [PATCH] Implement function for publishing to Mastodon --- emailmastodon | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/emailmastodon b/emailmastodon index e3cb5cf..3a73530 100755 --- a/emailmastodon +++ b/emailmastodon @@ -16,7 +16,8 @@ def show_version(): print("There is NO WARRANTY, to the extent permitted by law.") def publish(ctx, token, url): - pass + m = Mastodon(access_token=token, api_base_url=url) + m.toot(ctx) def listen(user, passwd, url, port): mail = imaplib.IMAP4_SSL(url, port=port)