From 1bd0ae824e4eadcadeed97d55b4352c97d84d3d5 Mon Sep 17 00:00:00 2001 From: Clarth Date: Tue, 2 Jan 2024 17:28:24 -0500 Subject: [PATCH] Fixed typo in Unit file Unit description was tg_spotdl from a copy and paste mistake. --- README.md | 116 +++++++++++++++++++++++++++--------------------------- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/README.md b/README.md index 0323ae1..f2ad4fe 100644 --- a/README.md +++ b/README.md @@ -1,58 +1,58 @@ -Centered Image - - -# Set Up Guide -1. Install cups - -`sudo apt install cups` - -2. Create a python virtual environment - - `python3 -m venv /absolute/path/to/venv` - -3. Install depends in venv - - `/absolute/path/to/venv/bin/pip3 install pyTelegramBotAPI` or `/absolute/path/to/venv/bin/pip install pyTelegramBotAPI==4.14.0` - -4. Edit tg_print.py with correct telegram API token and change directories variables. - -5. 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 +Centered Image + + +# Set Up Guide +1. Install cups + +`sudo apt install cups` + +2. Create a python virtual environment + + `python3 -m venv /absolute/path/to/venv` + +3. Install depends in venv + + `/absolute/path/to/venv/bin/pip3 install pyTelegramBotAPI` or `/absolute/path/to/venv/bin/pip install pyTelegramBotAPI==4.14.0` + +4. Edit tg_print.py with correct telegram API token and change directories variables. + +5. Start the script +`/absolute/path/to/venv/bin/python tg_print.py` + + +## Unit file + +``` +[Unit] +Description=tg_print_bot +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