2024-05-20 22:28:48 +00:00
|
|
|
Basic Markov bot for Misskey. Fork of https://activitypub.software/kopper/markov
|
|
|
|
|
2024-05-21 00:47:04 +00:00
|
|
|
Generates a model from a note export and posts automatically.
|
|
|
|
|
|
|
|
Changes from original:
|
|
|
|
- Relevant options are no longer hardcoded for easier configuration
|
|
|
|
- Stores a log of past posts to avoid repeating itself
|
|
|
|
- Option to post without CW
|
|
|
|
|
2024-05-20 22:28:48 +00:00
|
|
|
## Setup
|
|
|
|
|
|
|
|
- Install dependencies:
|
|
|
|
```
|
|
|
|
pip install -r requirements.txt
|
|
|
|
python -m spacy download en_core_web_sm
|
|
|
|
```
|
|
|
|
- Export your notes from Misskey and generate a model:
|
|
|
|
```
|
|
|
|
python import-misskey.py notes-XXXX-XX-XX-XX-XX-XX.json
|
|
|
|
```
|
|
|
|
- Generate an API token for the bot account and use it here:
|
|
|
|
```
|
|
|
|
echo "TOKEN='yourtoken'" > secrets__.py
|
|
|
|
```
|
|
|
|
- Copy `config__.default.py` to `config__.py` and edit as needed
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
```
|
|
|
|
python generate.py
|
|
|
|
```
|
|
|
|
Point a cronjob to this file to post automatically
|