diff --git a/__pycache__/randstrip.cpython-36.pyc b/__pycache__/randstrip.cpython-36.pyc deleted file mode 100644 index 1456138..0000000 Binary files a/__pycache__/randstrip.cpython-36.pyc and /dev/null differ diff --git a/history/history.db b/history/history.db deleted file mode 100644 index 2561ae4..0000000 Binary files a/history/history.db and /dev/null differ diff --git a/mastodon_main.py b/mastodon_main.py old mode 100644 new mode 100755 index 1e21ac3..bdfc83e --- a/mastodon_main.py +++ b/mastodon_main.py @@ -2,39 +2,19 @@ from randstrip import createStrip from mastodon import Mastodon import os.path - + +API_URL = "https://botsin.space" + if __name__ == "__main__": with open("createapp") as f: createapp = f.readlines() createapp = [x.strip() for x in createapp] - app = createapp[0] - api_base_url_cr = createapp[1] - to_file_cr = createapp[2] - email = createapp[3] - pw = createapp[4] - if os.path.exists(content[2]) == False: - Mastodon.create_app( - app, - api_base_url = api_base_url_cr, - to_file = to_file_cr - ) - mastodon = Mastodon( - client_id = to_file_cr, - api_base_url = api_base_url_cr - ) - mastodon.log_in( - email, - pw, - to_file = to_file_cr - ) - - mastodon = Mastodon( - access_token = to_file_cr - api_base_url = api_base_url_cr - ) + TOKEN = createapp[0] + mastodon = Mastodon(access_token = TOKEN,api_base_url = API_URL) status = createStrip("mastodon.png") if status == 0: - mastodon.media_post("mastodon.png","image/png") + new_strip = mastodon.media_post("mastodon.png","image/png") + mastodon.status_post("Nuova striscia",media_ids=new_strip) else: print("error creating image\n") - print status + print(status) diff --git a/prova.png b/prova.png deleted file mode 100644 index 0098bb9..0000000 Binary files a/prova.png and /dev/null differ diff --git a/telegram.png b/telegram.png deleted file mode 100644 index 119e502..0000000 Binary files a/telegram.png and /dev/null differ