mastodon-random-sentence-bot/README.md

77 lines
1.3 KiB
Markdown
Raw Permalink Normal View History

2024-07-04 18:11:04 +09:00
# Mastodon Random Sentence Bot
2023-12-08 23:17:14 +09:00
2023-12-08 23:21:14 +09:00
[![no github badge](https://nogithub.codeberg.page/badge.svg)](https://nogithub.codeberg.page/)
2024-07-04 18:11:04 +09:00
A mastodon bot posting random sentences. Forked from [Misskey Random Sentence Bot](https://git.worldc.one/worldcone/misskey-random-sentence-bot)
2023-12-09 00:25:33 +09:00
## How to run with docker compose
1. clone repo
2024-07-04 18:11:04 +09:00
2023-12-09 00:25:33 +09:00
2. change setting
2024-07-04 18:11:04 +09:00
```bash
# copy compose file
cp docker-compose.example.yml docker-compose.yml
# copy and edit .env
cp .example.env .env
vim .env
2023-12-09 00:25:33 +09:00
```
2024-07-04 18:11:04 +09:00
3. add your access token
```bash
touch token.secret
vim token.secret
2023-12-09 00:25:33 +09:00
```
2024-07-04 18:11:04 +09:00
4. RUN
2023-12-09 00:25:33 +09:00
2024-07-04 18:11:04 +09:00
```bash
docker compose up
docker compose down
2023-12-09 00:25:33 +09:00
```
2023-12-08 23:17:14 +09:00
## How to run manually
2023-12-03 23:01:55 +09:00
1. clone repo
2023-12-09 00:22:57 +09:00
2023-12-03 23:01:55 +09:00
2. make venv
2023-12-08 23:17:14 +09:00
2024-07-04 18:11:04 +09:00
```bash
2023-12-03 23:01:55 +09:00
python3 -m venv venv
source ./venv/bin/activate
```
2023-12-08 23:17:14 +09:00
2023-12-03 23:01:55 +09:00
3. install modules
2023-12-08 23:17:14 +09:00
2024-07-04 18:11:04 +09:00
```bash
2023-12-03 23:01:55 +09:00
pip install -r requirements.txt
```
2023-12-08 23:17:14 +09:00
2024-07-04 18:11:04 +09:00
4. change setting(changing the sentences and words directories as a absolute path is recommended)
2023-12-08 23:17:14 +09:00
2024-07-04 18:11:04 +09:00
```bash
2023-12-03 23:01:55 +09:00
# copy example setting file
2023-12-08 23:17:14 +09:00
cp .example.env .env
2023-12-03 23:01:55 +09:00
# edit setting file
2023-12-08 23:17:14 +09:00
vim .env
2023-12-03 23:01:55 +09:00
```
2023-12-08 23:17:14 +09:00
2023-12-09 00:25:33 +09:00
5. RUN
2023-12-08 23:17:14 +09:00
2024-07-04 18:11:04 +09:00
```bash
2023-12-09 00:25:33 +09:00
python main.py
2023-12-08 23:17:14 +09:00
```
2023-12-09 00:22:57 +09:00
# Contribute
2023-12-09 00:22:57 +09:00
To contribute to this project is free!
## Contributors
2023-12-09 00:22:57 +09:00
**Thank you for your contribution!**
<a class="contributor" href="https://codeberg.org/kdh8219"><img src="https://codeberg.org/avatars/6529ee7f1f363a06741ed8851c08e94b77d27e83003d1a58f59e1e936087728c?size=512" alt="kdh8219" width="70" style="border-radius: 50%"></a>