aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Utilities/AccountManager.py5
-rwxr-xr-xmain.py4
2 files changed, 6 insertions, 3 deletions
diff --git a/Utilities/AccountManager.py b/Utilities/AccountManager.py
index daad76d..51d3dc3 100644
--- a/Utilities/AccountManager.py
+++ b/Utilities/AccountManager.py
@@ -104,4 +104,9 @@ class AccountManager:
Mastodon(client_id = mapp, api_base_url = mbase,
access_token = muser).toot(message)
+ def post_topic(self, topic):
+ msg = "Nouveau topic par {} : {}\n{}".format(topic.poster.name,
+ topic.title, topic.link())
+ self.post(msg)
+
# End of file.
diff --git a/main.py b/main.py
index e849c78..bfff8f6 100755
--- a/main.py
+++ b/main.py
@@ -56,8 +56,6 @@ if __name__ == "__main__":
for topic in cache:
print("[+] Publishing post for topic {}".format(topic.id))
- msg = "Nouveau topic par {} : {}\n{}".format(topic.poster.name,
- topic.title, topic.link())
- mgr.post(msg)
+ mgr.post_topic(topic)
# End of file.