grapemane пре 1 година
родитељ
комит
ed2c214d42
1 измењених фајлова са 6 додато и 3 уклоњено
  1. 6 3
      masto.py

+ 6 - 3
masto.py

@@ -9,15 +9,15 @@ import time
 '''
 Mastodon.create_app(
     'grapeapp',
-    api_base_url = 'https://noc.social/',
+    api_base_url = 'https://YOUR_MASTODON_BASE_URL/',
     to_file = 'grapeapp_clientcred.secret'
 )
 '''
 
 mastodon = Mastodon(client_id = 'grapeapp_clientcred.secret',)
 mastodon.log_in(
-    'nocsocial@teets.us',
-    'WW936dQL1H0w9zLsWvyh3Z3e1yFrE39oYoxmdARCIk8IcrBH',
+    'ENTER_YOUR_MASTODON_USERNAME',
+    'ENTER_YOUR_MASTODON_PASSWORD',
     to_file = 'grapeapp_usercred.secret'
 )
 
@@ -38,7 +38,9 @@ while True:
     cleanTags = re.compile('<.*?>')
     tweetWithoutTags = re.sub(cleanTags, '', mostRecentMention)
 
+    #put your bot's name and domain on the next line
     cleanMention = re.compile('@developer(@noc\.social)*')
+    
     tweetWithoutMention = re.sub(cleanMention, '', tweetWithoutTags)
     
     cleanTweet = re.sub(r'[^a-zA-Z0-9 ]', '', tweetWithoutMention)
@@ -63,6 +65,7 @@ while True:
     mentionTag = urlParts[1] + '@' + urlParts[0]
     print(mentionTag)
 
+    #put the file path for your stable diffusion output on the next line
     mediaId = mastodon.media_post(media_file = 'C:\\Users\\bigd\\Downloads\\stable-diffusion-main\\stable-diffusion-main\\outputs\\txt2img-samples\\' + folderName + '\\seed_28_00000.png', mime_type = 'image/png')