Skip to content

kunesj/fbk_glasses_bot

 
 

Repository files navigation

fbk_glasses_bot

Reddit bot for automatic Fubuki copypasta.

Setup - Docker (Recommended)

Create config.json file with your API credentials and other configuration.

{
    "author": "YOUR_USER_NAME",
    "subreddits": ["hololive", "hololewd", "test"],
    "client_id": "***********",
    "client_secret": "***********",
    "username": "fbk_glasses_bot",
    "password": "***********"
}

Start the docker image

docker compose up

Setup - Raspbian GNU/Linux 10 (buster)

Following instructions are for Raspbian GNU/Linux 10 (buster), but they should be very similar for any other Debian/Ubuntu based OS.

Install dependencies

uv sync --locked

Create config file

Create config.json file with your API credentials and other configuration.

{
    "author": "YOUR_USER_NAME",
    "subreddits": ["hololive", "hololewd", "test"],
    "client_id": "***********",
    "client_secret": "***********",
    "username": "fbk_glasses_bot",
    "password": "***********"
}

Check if the bot works

uv run python fbk_glasses_bot.py

Create service (Optional)

To automatically start the bot as a system service, create a new file /etc/systemd/system/fbk_glasses_bot.service. Replace YOUR_USER_NAME with your username, and check that the working directory is correct.

[Service]
WorkingDirectory=/home/YOUR_USER_NAME/fbk_glasses_bot
ExecStart=/home/YOUR_USER_NAME/.local/bin/uv run python fbk_glasses_bot.py
Restart=always
User=YOUR_USER_NAME
Group=YOUR_USER_NAME

[Install]
WantedBy=multi-user.target

Start the service and make it automatically start at boot.

sudo systemctl daemon-reload
sudo systemctl start fbk_glasses_bot
sudo systemctl enable fbk_glasses_bot

You can check status and logs with these commands.

sudo systemctl status fbk_glasses_bot
sudo journalctl -u fbk_glasses_bot

Development

Pre-commit

Install prek:

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/j178/prek/releases/download/v0.2.3/prek-installer.sh | sh
prek self update

Install hooks:

prek install
prek install-hooks

To manually run it on all files:

prek run --all-files

About

Reddit bot for automatic Fubuki copypasta

Topics

Resources

Stars

Watchers

Forks

Languages

  • Python 80.7%
  • Dockerfile 18.0%
  • Shell 1.3%