A Mastodon bot to drip-toot a Piwigo gallery one image at a time.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12345678910111213141516171819
  1. from mastodon import Mastodon
  2. import config
  3. def register_app():
  4. Mastodon.create_app(
  5. config.APP_NAME,
  6. website=config.APP_WEBSITE,
  7. api_base_url=config.APP_INSTANCE_URL,
  8. to_file='secrets.txt')
  9. app = Mastodon(client_id='secrets.txt')
  10. print("Browse to the OAuth authorization page at")
  11. print(app.auth_request_url())
  12. app.log_in(
  13. code=input("and paste here the OAuth authorization code: "),
  14. to_file='secrets.txt')
  15. print("Registration complete")
  16. if __name__=='__main__':
  17. register_app()