From 2028014a5003be82e75818bc8221c6713a3afc56 Mon Sep 17 00:00:00 2001 From: RaviAnand Mohabir Date: Mon, 30 Oct 2023 14:45:24 +0100 Subject: [PATCH] docs: :memo: add usage and listy sync docs --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 1944b8c..0075cf6 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,10 @@ A web application that syncs your liked songs into a monthly playlist built with - Reuse playlists following the same naming scheme - Run the sync script as a one-time command (`listy sync`) or on a time (`listy sync -r 5m`) +## Usage + +Once you've deployed your Listy instance, all you need to do is head to http(s)://listy.example.com/auth/oidc/spotify/redirect where you will be redirected to Spotify for authorization, and then registered in Listy's database for monitoring. As long as the sync timer is running, or you setup a CRON job for the `listy sync` command, your liked songs will then automatically be synced with the current monthly playlist. + ## Deployment Listy can be run as a self-hosted application as a Docker container or with Go installed. @@ -62,6 +66,12 @@ Finally, run the following in the folder where your `docker-compose.yml` and `co $ docker compose up -d ``` +## `listy sync` + +Besides the Go server (run with `listy server run`) the `sync` command provides most of the functionality in a self-contained worker that can either be run once or repeated by providing the `--repeat` flag which will be parsed by Go's [`time.ParseDuration()`](https://pkg.go.dev/time#ParseDuration) function. This will allow the sync script to run indefinitely. + +Alternatively, you can setup the `listy sync` command as a CRON job or on Kubernetes as a `CronJob` resource. + ## License Listy is licensed under the [MIT license](./LICENSE).