Compare commits

..

2 Commits

3 changed files with 15 additions and 5 deletions

View File

@ -120,6 +120,21 @@ Next, run the following commands:
If you followed the steps above the cron job should run every 30 minutes at 25 and 55 minutes past the hour. Tail the log file to ensure it's working correctly.
The cron.sh script will parse the log.txt file to get the next index to post from.
## Post a Specific Image
Make sure settings_behavior["master_list"] is set to "-" to take input from stdin
```
echo './path/to/image.png' | ./run
```
## Post a Random Image From The Masterlist
Make sure settings_behavior["master_list"] is set to "-" to take input from stdin
```
shuf -n 1 master_file.txt | ./run
```
This is the method that is used for [MiraiNikkiBot](https://yandere.cc/users/MiraiNikkiBot) and the various framebots I host at [GNU/Yandere](https://yandere.cc)
## Quickly Create Configuration Files
Configuration files for Yandere Lewd Bot are just python files. Because of this we can easily create multiple configurations by importing the main configuration file, and overriding the values we need. This is useful for creating holiday and debug configurations without needing to create a new configuration file from scratch.
```

View File

@ -79,7 +79,6 @@ settings_behavior = {
"content_type": "text/plain",
"content_newline": "\n",
"post_image_link": False,
"tmp_dir": "/var/tmp",
"debug": False
}

View File

@ -45,8 +45,6 @@ This is the main configuration setting for the bot.
**`feature_set:`** The feature set of the instance you are connecting to ('mainline', 'fedibird', or 'pleroma'). **This bot has only been tested with 'pleroma'.**
**`sleep_seconds:`** The time between posts (in seconds)
**`uploads_per_post:`** The number of times the bot should post after `sleep_seconds`
**`max_errors:`** The max consecutive posting errors that should occur before the bot gives up and exits. This usually indicates a temporary problem with the remote server, however if the bot repeatedly fails, and the server is up, it probably means the image is too large to upload. Try reducing the `max_size` variable if this happens. Your image may also be in a format that the remote server rejects, in which case the post should be added to the master blacklist.
@ -61,8 +59,6 @@ This is the main configuration setting for the bot.
**`post_image_link:`** If set to `True` this will insert a direct media link at the end of the message for each media file uploaded. If `content_type` is `'text\markdown'` it will make the link actionable, otherwise it will simply be a plain text html link. Some instances add this link automatically, in which case this should be set to `False`. See `content_newline` and `content_type` to correctly configure actionable links.
**`tmp_dir:`** The temporary directory to use if `atomic_saving` is set to `True`. The default location is `/var/tmp`.
**`debug:`** Set this to true for testing. This will prevent Yandere Lewd Bot from logging into the mastodon instance and asking for your encryption password (meaning that nothing will actually get posted to your account, but it will still do everything else).
## settings_time