Update README.md

This commit is contained in:
Clarth 2025-02-16 16:09:30 -05:00
parent 3dd147335d
commit e34257e97c
1 changed files with 55 additions and 55 deletions

110
README.md
View File

@ -1,55 +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/pip3 install pyTelegramBotAPI` `/absolute/path/to/venv/bin/pip3 install pyTelegramBotAPI requests beautifulsoup4 spotdl`
3. Edit start.py with correct telegram API token and change directories variables. 3. Edit start.py with correct telegram API token and change directories variables.
4. Start the script 4. Start the script
`/absolute/path/to/venv/bin/python start.py` `/absolute/path/to/venv/bin/python start.py`
## Unit file ## Unit file
``` ```
[Unit] [Unit]
Description=tg_spotdl Description=tg_spotdl
After=network-online.target After=network-online.target
[Service] [Service]
User=nobody User=nobody
ExecStart=/absolute/path/to/venv/bin/python /absolute/path/to/start.py ExecStart=/absolute/path/to/venv/bin/python /absolute/path/to/start.py
Restart=always Restart=always
RestartSec=5s RestartSec=5s
RuntimeMaxSec=12h RuntimeMaxSec=12h
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
``` ```
## Start Script ## Start Script
``` ```
#!/bin/bash #!/bin/bash
/absolute/path/to/venv/bin/python /absolute/path/to/start.py /absolute/path/to/venv/bin/python /absolute/path/to/start.py
exit exit
``` ```
# Usage # Usage
1. Private message your bot. 1. Private message your bot.
2. Type `/start` in the PM 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. 3. The bot will ask for the artist url. It will look something like this `https://open.spotify.com/artist/lajs7ahska91187skas`
4. The bot will ask for the artist url. It will look something like this `https://open.spotify.com/artist/lajs7ahska91187skas` 4. Bot auto gets the artist name.
5. Wait, the bot will let you know when it's done and ready for another artist. 5. Wait, the bot will let you know when it's done and ready for another artist.
## Useful Links ## Useful Links
https://github.com/eternnoir/pyTelegramBotAPI https://github.com/eternnoir/pyTelegramBotAPI