Updated documentation
This commit is contained in:
parent
01d898288a
commit
22e520ef6a
31
README.md
31
README.md
@ -6,11 +6,11 @@ A live example can be viewed at [GNU/Yandere](https://yandere.cc/YandereLewdBot)
|
||||
Currently the bot will only run on Linux. I believe it should run on most distros but I have only tested it on Arch and Raspbian.
|
||||
|
||||
## About
|
||||
Yandere Lewd Bot is designed to be simple to understand (from a technical perspective) and easy to modify/extend. It relies on GNU formatted hash files to configure and organize posts (from the GNU coreutils package):
|
||||
Yandere Lewd Bot is designed to be simple to understand (from a technical perspective) and easy to modify/extend. It relies on a list of file paths to configure and upload posts.
|
||||
|
||||
This project is licensed under GPLv3. See [LICENSE.txt](./LICENSE.txt).
|
||||
|
||||
The bot is still in development and can easily be crashed by writing a poorly configured `cfg.py` file, or messing with the hash files it uses to configure posts. The bot may also crash with encoding errors for files with non-unicode filenames.
|
||||
The bot is still in development and can easily be crashed by writing a poorly configured `cfg.py` file, or messing with the masterlist it uses to configure posts. The bot may also crash with encoding errors for files with non-unicode filenames.
|
||||
|
||||
## Installing
|
||||
To setup the python3 environment (for Arch Linux) run the following commands:
|
||||
@ -82,14 +82,14 @@ To begin posting:
|
||||
- 'safe' posts will be marked with `#yandere`
|
||||
- 'nsfw' posts will be set to sensitive and marked as `#nsfw #lewd #yandere`
|
||||
- Make sure you are in the bot's root directory (the directory with `run.sh`)
|
||||
- Checksum all the files you added with the following command:
|
||||
- `find "./rsc" -type f -exec md5sum -b '{}' \; > "./md5/master_file.txt"`
|
||||
- Start the bot with `./run.sh`
|
||||
- Get all the files you added with the following command:
|
||||
- `find "./rsc" -type f -print > "./md5/master_file.txt"`
|
||||
- Start the bot with `./cron.sh > log.txt 2>&1`
|
||||
- Enter your password if you encrypted your OAuth tokens.
|
||||
- If you symlinked the file in the [Installing](#installing) section you can simply run `yandereLewdBot` instead of changing directories and starting the bot with `./run.sh`
|
||||
- If everything worked correctly, you should see your first image posted to your account.
|
||||
- When you start the bot again, it will begin posting from where it last left off.
|
||||
- It accomplishes this by writing to a `md5/blacklist.txt` file. If you see this file, it worked correctly.
|
||||
- It accomplishes this by writing the current line number to `log.txt` and incrementing it everytime `cron.sh` is called.
|
||||
- Keep in mind that the bot's default visibility setting is set to unlisted for testing. You may want to update it to public.
|
||||
- Read [docs/configuration.md](./docs/configuration.md) to customize the bot for your purposes.
|
||||
|
||||
@ -114,19 +114,12 @@ sudo systemctl start cronie
|
||||
|
||||
Next, run the following commands:
|
||||
- `crontab -e`
|
||||
- `25,55 * * * * /absolute/path/to/run.sh >> "/absolute/path/to/log.txt" 2>&1`
|
||||
- `25,55 * * * * /absolute/path/to/cron.sh >> "/absolute/path/to/log.txt" 2>&1`
|
||||
- Modify the paths above to suit your preferences
|
||||
- Save and exit
|
||||
|
||||
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.
|
||||
|
||||
## A Master Blacklist
|
||||
The default configuration file has the following settings below (these files will not exist by default. The bot will simply ignore blacklist hash files that it can't open). The `_r` stands for read and the `_w` stands for write. This will ensure that the `master_blacklist.txt` is always read, but is never written to. This is intended for the user to manually add GNU formatted hashes to `master_blacklist.txt` in case they want to make especially sure that hashes and paths that are matched in the list are never uploaded accidentally.
|
||||
```
|
||||
"master_blacklist_r": ("./md5/blacklist.txt", "./md5/master_blacklist.txt"),
|
||||
"master_blacklist_w": ("./md5/blacklist.txt",),
|
||||
```
|
||||
|
||||
## 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.
|
||||
```
|
||||
@ -153,14 +146,10 @@ settings_encrypt = {
|
||||
"keyfile": None
|
||||
}
|
||||
|
||||
settings_behavior["master_blacklist_r"] = ("./md5/blacklist_alt.txt", "./md5/master_blacklist.txt")
|
||||
settings_behavior["master_blacklist_w"] = ("./md5/blacklist_alt.txt",)
|
||||
|
||||
# Uncommenting the below might be useful if your alt is used for debugging and testing
|
||||
# settings_behavior["master_list"] = ("master_file_alt.txt",)
|
||||
# settings_behavior["master_list"] = "master_file_alt.txt"
|
||||
# settings_behavior["visibility"] = "private"
|
||||
# settings_behavior["debug"] = True
|
||||
# settings_behavior["master_blacklist_w"] = tuple()
|
||||
```
|
||||
|
||||
```
|
||||
@ -171,9 +160,7 @@ settings_behavior["master_blacklist_w"] = ("./md5/blacklist_alt.txt",)
|
||||
# cfg.py is the default configuration.
|
||||
from cfg import *
|
||||
|
||||
settings_behavior["master_list"] = ("./md5/event_xmas.txt",)
|
||||
settings_behavior["master_blacklist_r"] = ("./md5/blacklist_xmas.txt", "master_blacklist.txt")
|
||||
settings_behavior["master_blacklist_w"] = ("./md5/blacklist_xmas.txt",)
|
||||
settings_behavior["master_list"] = "./md5/event_xmas.txt"
|
||||
|
||||
# Prepend '#Merry #Christmas' to the beginning of the first line in each post
|
||||
for setting in settings_post:
|
||||
|
Reference in New Issue
Block a user