Update readme.md
This commit is contained in:
parent
d8ed93e047
commit
76b08174d3
1 changed files with 34 additions and 3 deletions
37
readme.md
37
readme.md
|
@ -1,6 +1,37 @@
|
|||
# Imagebot
|
||||
imagebot is a misskey rgb gaming bot that sends images. currently powering [yaoibot](https://eepykitty.lol/@yaoibot). this bot can easilly be adapted to pull data from elsewhere by replacing image_source.py.
|
||||
# imagebot
|
||||
A bot to post images to a \*key server.
|
||||
Includes an easy way to program a new source for images.
|
||||
|
||||
Source can be found at [Julimiro/imagebot](https://git.gay/Julimiro/imagebot/), documentation can be found [here]().
|
||||
## Usage
|
||||
\*Only required if using danbooru image source,
|
||||
|
||||
wip
|
||||
|
||||
1\. Clone the repo
|
||||
`git clone https://git.gay/Julimiro/imagebot.git`
|
||||
2\. Install modules
|
||||
`pip install dotenv requests`
|
||||
|
||||
4\. Create an account for the bot on your \*key server.\*
|
||||
|
||||
5\. Generate an api key by navigating to `/settings/api` of the server and clicking generate access token. Below is a list of permissions the bot needs. After setting the permissions, give the token a name and press done. Make sure to **keep note of the token that flashes on screen**.
|
||||
- Access your Drive files and folders
|
||||
- Compose or delete notes
|
||||
|
||||
6\. Open the .env file
|
||||
- Change baseurl to your \*key instances url including /api.
|
||||
- Change the searchquery to what you want, make sure to keep `rating:general order:random`. \*
|
||||
`rating:general` keeps it safe for work and `order:random` ensures a post isnt duplicated(probably) .
|
||||
- Change `danbooru_user` to the bots danbooru username.\*
|
||||
- Change `danbooru_apikey` to an api key generated by going to your danbooru user page, scrolling own to "API Key" and clicking view. \*
|
||||
-Change `api_key` to an your token generated earlier in step 5..
|
||||
- `secret` should not be modified yet.
|
||||
- Save the file.
|
||||
|
||||
7\. Run `get_apps.py`.
|
||||
8\. Enter the output of get_apps.py into the `secret` option in .env.
|
||||
9\. Now when `main.py` is ran, an image should be posted.
|
||||
|
||||
|
||||
## Making an image source
|
||||
The `image_source.py` file must have a `main` function which doesnt take arguments but returns `string: post_url, string: image_url, string: artists`
|
Loading…
Reference in a new issue