#! /usr/bin/env python3 # Yandere Lewd Bot, an image posting bot for Pleroma # Copyright (C) 2022 Anon # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . from collections import OrderedDict def setup_profile(name, backend, tags, *message): post_setting = { "name": name, "backend": backend, "tags": tags, "message": message } return post_setting # Client credentials: >>>NEVER GIVE THESE OUT TO ANYONE<<< # Use the create_app.py script and follow the prompts to generate your tokens. Once generated, copy & paste them below. settings_server = OrderedDict([ ("app_name", "Generated from create_app.py"), ("api_base_url", "Generated from create_app.py"), ("client_id", "Generated from create_app.py"), ("client_secret", "Generated from create_app.py"), ("access_token", "Generated from create_app.py") ]) # settings_reminder = "Generated from create_app.py" settings_reminder = "08/26/2022 08:16PM" # Encryption settings: When using encryption the bot will ask you for your password before logging into your instance. # Use create_app.py and follow the instructions. Select yes when it asks you if you want to encrypt your credentials. # Paste the output below and never change the values. # If you want to encrypt or re-encrypt settings_server you can use encryption.py (or just regenerate your tokens) settings_encrypt = { "encrypt": False, "salt": "Generated from create_app.py" } settings_credentials = { "danbooru_backend": { "username": None, "password": None } } settings_banned = tuple() # Basic settings to configure Yandere Bot's behavior settings_behavior = { "max_size": 15*1024*1024, "visibility": "unlisted", "feature_set": "pleroma", "sleep_seconds": 1*60*60, "uploads_per_post": 1, "tag_select": "sequential", "retry_seconds": 15, "content_type": "text/plain", "content_newline": "\n", "post_image_link": False, "tmp_dir": "/tmp", "debug": False } # Time string formats settings_time = { "time_format": "%I:%M%p", "time_format_seconds": "%I:%M:%S%p", "date_format": "%m/%d/%Y", "long_date_format": "%m/%d/%Y %I:%M%p", "long_date_seconds_format": "%m/%d/%Y %I:%M:%S%p", "long_date_week": "%m/%d/%Y %I:%M%p, %A" } # Apply post settings settings_post = ( setup_profile("danbooru.random", "danbooru_backend", ("random",), "#random"), setup_profile("danbooru.yandere", "danbooru_backend", ("yandere",), "#yandere"), ) # Default post behavior: # If no profile can be matched in a master_list, it will default to settings_post_default # If settings_post_default is None, the bot will error out and output the offending line(s) # If you want the bot to start, set this to a valid settings_post, or create a default setting with setup_profile() settings_post_default = None