1
0
Fork 0
mirror of https://github.com/myned/modufur.git synced 2024-12-24 06:27:27 +00:00

Update readme

This commit is contained in:
Myned 2023-03-06 21:49:03 -06:00
parent 4053698d2a
commit ac818ff351
No known key found for this signature in database
GPG key ID: 28056631D2CF6B1B

View file

@ -4,31 +4,31 @@ An experimental [Hikari](https://www.hikari-py.dev) Discord bot for reverse imag
[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/B0B1AUB66)
## Prerequisites
A Unix-based operating system is used for the following commands\
Linux is used for the following commands\
[WSL](https://docs.microsoft.com/en-us/windows/wsl) can be used to run Linux on Windows, but is not required to run the bot
## Requirements
[Git](https://git-scm.com/downloads)\
[Python](https://www.python.org) 3.10+\
[Poetry](https://python-poetry.org/docs/master)
## Installing
Clone this repository
1. Clone repository
```
git clone https://github.com/Myned/Modufur.git
```
Go to the project folder
2. Go to project folder
```
cd Modufur
```
Create a virtual environment and install dependencies
3. Create a virtual environment and install dependencies
```
poetry install
```
## Usage
Go to the project folder
1. Go to project folder
```
cd Modufur
```
Run with optimizations
2. Run with optimizations
```
poetry run python -OO run.py
```
@ -44,25 +44,57 @@ activity = "" # bot status
saucenao = "" # saucenao token
e621 = "" # e621 token
```
## Updating
Go to the project folder
### systemd service
Run in the background on most Linux machines\
This assumes that the project folder is located at `~/.git/Modufur`\
Change the `WorkingDirectory` path in `modufur.service` if this is not the case
1. Go to project folder
```
cd Modufur
```
Pull changes from the repository
2. Copy user service file
```
cp modufur.service ~/.config/systemd/user
```
3. Reload user daemon
```
systemctl --user daemon-reload
```
4. Start and enable service on login
```
systemctl --user enable --now modufur
```
5. Enable lingering to start user services on boot
```
sudo loginctl enable-linger username
```
## Updating
1. Go to project folder
```
cd Modufur
```
2. Pull changes from repository
```
git pull
```
Remove the virtual environment folder (necessary because of git dependencies)
```
rm -rf .venv
```
Reinstall and update the virtual environment
3. Update virtual environment
```
poetry update
```
## Uninstalling
Remove the project folder
1. Stop and disable systemd user service
```
systemctl --user disable --now modufur
```
2. Remove systemd user service file
```
rm ~/.config/systemd/user/modufur.service
```
3. Optionally disable lingering
```
sudo loginctl disable-linger username
```
4. Remove project folder
```
rm -rf Modufur
```