Update README.md

fixed wrong depends
This commit is contained in:
Clarth 2023-11-14 17:23:04 -05:00
parent eb2290ef07
commit 53dbc836cc
1 changed files with 55 additions and 59 deletions

114
README.md
View File

@ -1,59 +1,55 @@
# Set Up Guide # Set Up Guide
1. Create a python virtual environment 1. Create a python virtual environment
`python3 -m venv /absolute/path/to/venv` `python3 -m venv /absolute/path/to/venv`
2. Install depends in venv 2. Install depends in venv
`/absolute/path/to/venv/bin/pip install spotdl` `/absolute/path/to/venv/bin/pip install spotdl`
`/absolute/path/to/venv/bin/pip install python-telegram-bot` `/absolute/path/to/venv/bin/pip3 install pyTelegramBotAPI`
2b. This script was written with version 4.14.0 of the python-telegram-bot. If something goes wrong you can install that spcific version using this command. 3. Edit start.py with correct telegram API token and change directories variables.
`/absolute/path/to/venv/bin/pip install python-telegram-bot==4.14.0` 4. Start the script
`/absolute/path/to/venv/bin/python start.py`
3. Edit start.py with correct telegram API token and change directories variables.
4. Start the script ## Unit file
`/absolute/path/to/venv/bin/python start.py`
```
[Unit]
## Unit file Description=tg_spotdl
After=network-online.target
```
[Unit] [Service]
Description=tg_spotdl User=nobody
After=network-online.target ExecStart=/absolute/path/to/venv/bin/python /absolute/path/to/start.py
Restart=always
[Service] RestartSec=5s
User=nobody RuntimeMaxSec=12h
ExecStart=/absolute/path/to/venv/bin/python /absolute/path/to/start.py
Restart=always [Install]
RestartSec=5s WantedBy=multi-user.target
RuntimeMaxSec=12h
```
[Install]
WantedBy=multi-user.target ## Start Script
```
``` #!/bin/bash
/absolute/path/to/venv/bin/python /absolute/path/to/start.py
## Start Script exit
``` ```
#!/bin/bash
/absolute/path/to/venv/bin/python /absolute/path/to/start.py
exit # Usage
```
1. Private message your bot.
2. Type `/start` in the PM
# Usage 3. It will ask you for an artist name. It **NEEDS** to be excatly as you see it on the artists spotify page. The bot uses this as the directory name it downloads the music into.
4. The bot will ask for the artist url. It will look something like this `https://open.spotify.com/artist/lajs7ahska91187skas`
1. Private message your bot. 5. Wait, the bot will let you know when it's done and ready for another artist.
2. Type `/start` in the PM
3. It will ask you for an artist name. It **NEEDS** to be excatly as you see it on the artists spotify page. The bot uses this as the directory name it downloads the music into.
4. The bot will ask for the artist url. It will look something like this `https://open.spotify.com/artist/lajs7ahska91187skas` ## Useful Links
5. Wait, the bot will let you know when it's done and ready for another artist. https://github.com/eternnoir/pyTelegramBotAPI
## Useful Links
https://github.com/eternnoir/pyTelegramBotAPI