diff --git a/README.md b/README.md index fe64ff3..6d88ddf 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,25 @@ # autoradio -A little Python script to download audio files from RSS feeds. Installation -is messy and I have tested this on exactly two feeds, so it's by no means -finished software. +A little Python script to download audio files from RSS feeds and put them +somewhere so that your music server can grab them. Has been tested on two (2) +feeds. ## Installation -I packaged this project with poetry and then discovered that poetry can't -install pycurl properly, as the latter requires command-line options to compile -it with the correct SSL backend. Here's the manual workaround: +Dependencies are managed with [uv](https://docs.astral.sh/uv/getting-started/installation/) so install that if you haven't already. - > git clone https://git.tilde.town/bombinans/autoradio.git - > cd autoradio - > poetry install - > poetry shell - > pip uninstall pycurl - > pip install --compile --install-option="--with-openssl" pycurl - > poetry run autoradio --config config.json +Then: -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": { @@ -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 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 -things like redirects, hopefully). \ No newline at end of file +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