chiark / gitweb /
Starting from ZERO
authormpaglia0 <mpaglia0@gmail.com>
Sat, 19 Nov 2022 08:48:57 +0000 (09:48 +0100)
committermpaglia0 <mpaglia0@gmail.com>
Sat, 19 Nov 2022 08:48:57 +0000 (09:48 +0100)
pelican_toot.py

index a1bcb1fa705e044011c590e8bd7b68cd85597c88..ee59fb733a3cb88e02d761a11d2a48f63ee42329 100644 (file)
@@ -2,43 +2,3 @@
 """
 Post new articles on Mastodon
 """
-
-import string
-
-import logging
-logger = logging.getLogger(__name__)
-
-from pelican import signals
-
-# https://github.com/halcy/Mastodon.py
-
-# Copied from Mastodon.py readme - fix it!!
-# Register your app! This only needs to be done once. Uncomment the code and substitute in your information.
-
-from mastodon import Mastodon
-
-'''
-Mastodon.create_app(
-     'pytooterapp',
-     api_base_url = 'https://mastodon.social',
-     to_file = 'pytooter_clientcred.secret'
-)
-'''
-
-# Then login. This can be done every time, or use persisted.
-
-from mastodon import Mastodon
-
-mastodon = Mastodon(client_id = 'pytooter_clientcred.secret')
-mastodon.log_in(
-    'my_login_email@example.com',
-    'incrediblygoodpassword',
-    to_file = 'pytooter_usercred.secret'
-)
-
-# To post, create an actual API instance.
-
-from mastodon import Mastodon
-
-mastodon = Mastodon(access_token = 'pytooter_usercred.secret')
-mastodon.toot('Tooting from Python using #mastodonpy !')