diff --git a/mastodon_main.py b/mastodon_main.py index 683b8b1..c858f6b 100755 --- a/mastodon_main.py +++ b/mastodon_main.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 from randstrip import createStrip from mastodon import Mastodon -impor os +import os fileDir = os.path.dirname(os.path.abspath(__file__)) fileDir = fileDir +"/" @@ -13,7 +13,7 @@ if __name__ == "__main__": createapp = [x.strip() for x in createapp] TOKEN = createapp[0] mastodon = Mastodon(access_token = TOKEN,api_base_url = API_URL) - status = createStrip(fileDir+"mastodon.png") + status = createStrip("mastodon.png") if status == 0: new_strip = mastodon.media_post(fileDir+"mastodon.png","image/png") mastodon.status_post("Nuova striscia",media_ids=new_strip) diff --git a/randstrip.py b/randstrip.py index 20f01ac..83bcd7e 100755 --- a/randstrip.py +++ b/randstrip.py @@ -134,7 +134,7 @@ def createStrip(name): try: story = fetchVign() finalStrip = writeStrip(story) - finalStrip.save(name) + finalStrip.save(fileDir+name) return 0 except Exception as err: return err diff --git a/telegram_main.py b/telegram_main.py index 57885dc..e090d5a 100755 --- a/telegram_main.py +++ b/telegram_main.py @@ -8,7 +8,7 @@ fileDir = os.path.dirname(os.path.abspath(__file__)) fileDir = fileDir +"/" def newStrip(bot, update): - status = createStrip(fileDir+"telegram.png") + status = createStrip("telegram.png") if status == 0: try: bot.send_photo(chat_id=update.message.chat_id,photo=open(fileDir+"telegram.png","rb"))