Updated installation instructions for uv
This commit is contained in:
parent
3984261168
commit
e1026e83fb
40
README.md
40
README.md
@ -1,24 +1,25 @@
|
|||||||
# autoradio
|
# autoradio
|
||||||
|
|
||||||
A little Python script to download audio files from RSS feeds. Installation
|
A little Python script to download audio files from RSS feeds and put them
|
||||||
is messy and I have tested this on exactly two feeds, so it's by no means
|
somewhere so that your music server can grab them. Has been tested on two (2)
|
||||||
finished software.
|
feeds.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
I packaged this project with poetry and then discovered that poetry can't
|
Dependencies are managed with [uv](https://docs.astral.sh/uv/getting-started/installation/) so install that if you haven't already.
|
||||||
install pycurl properly, as the latter requires command-line options to compile
|
|
||||||
it with the correct SSL backend. Here's the manual workaround:
|
|
||||||
|
|
||||||
> git clone https://git.tilde.town/bombinans/autoradio.git
|
Then:
|
||||||
> cd autoradio
|
|
||||||
> poetry install
|
|
||||||
> poetry shell
|
|
||||||
> pip uninstall pycurl
|
|
||||||
> pip install --compile --install-option="--with-openssl" pycurl
|
|
||||||
> poetry run autoradio --config config.json
|
|
||||||
|
|
||||||
The config file looks like this.
|
> git clone https://git.tilde.town/bombinans/autoradio.git
|
||||||
|
> cd autoradio
|
||||||
|
> uv run autoradio.py --help
|
||||||
|
> uv run autoradio.py
|
||||||
|
|
||||||
|
To add feeds, edit the config.json file.
|
||||||
|
|
||||||
|
## Config
|
||||||
|
|
||||||
|
The config file is JSON as follows:
|
||||||
|
|
||||||
{
|
{
|
||||||
"feeds": {
|
"feeds": {
|
||||||
@ -40,4 +41,13 @@ file with the same name is already present, it won't be re-downloaded.
|
|||||||
The value in "max" is the number of entries to look at from each feed, starting
|
The value in "max" is the number of entries to look at from each feed, starting
|
||||||
from the latest. The script parses the RSS feed and looks for links which
|
from the latest. The script parses the RSS feed and looks for links which
|
||||||
seem likely to contain audio and tries to fetch them using pycurl (this handles
|
seem likely to contain audio and tries to fetch them using pycurl (this handles
|
||||||
things like redirects, hopefully).
|
things like redirects, hopefully).
|
||||||
|
|
||||||
|
## Running automatically
|
||||||
|
|
||||||
|
You will probable want to set up a cron job to run the script on a regular
|
||||||
|
schedule: all you need to change for this is provide full paths to everything,
|
||||||
|
including uv. Here's an example where the script is installed in the home
|
||||||
|
directory of the user ```pi``` under ```~/working/autoradio```
|
||||||
|
|
||||||
|
1 1 * * * /home/pi/.local/bin/uv /home/pi/working/autoradio.py --config /home/pi/working/autoradio/config.json
|
||||||
|
Loading…
x
Reference in New Issue
Block a user