From 194edf86fb2faf6dc1dc4c31491c7a5cd8a5e26d Mon Sep 17 00:00:00 2001 From: Clarth Date: Tue, 14 Nov 2023 17:33:44 -0500 Subject: [PATCH] Add README.md --- README.md | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..3424dc9 --- /dev/null +++ b/README.md @@ -0,0 +1,54 @@ +Centered Image + + +# Set Up Guide +1. Create a python virtual environment + + `python3 -m venv /absolute/path/to/venv` + +2. Install depends in venv + + `/absolute/path/to/venv/bin/pip3 install pyTelegramBotAPI` + +3. Edit tg_print.py with correct telegram API token and change directories variables. + +4. Start the script +`/absolute/path/to/venv/bin/python tg_print.py` + + +## Unit file + +``` +[Unit] +Description=tg_spotdl +After=network-online.target + +[Service] +User=nobody +ExecStart=/absolute/path/to/venv/bin/python /absolute/path/to/start.py +Restart=always +RestartSec=5s +RuntimeMaxSec=12h + +[Install] +WantedBy=multi-user.target + +``` + +## Start Script +Recommend running in a screen or tmux. +``` +#!/bin/bash +/absolute/path/to/venv/bin/python /absolute/path/to/start.py +exit +``` + + +# Usage + +1. Send a file to the chat or directly to the bot in a PM. +2. Collect paper from the printer. + + +## Useful Links +https://github.com/eternnoir/pyTelegramBotAPI