commit 32fa30d0a175e319b451f6b39fbfde3c3e1ebcf8 (patch)
parent 3052f31ffdaac2c8ec288fca73af1a7418d05daa
Author: Alex Karle <alex@alexkarle.com>
Date: Tue, 4 Feb 2025 20:49:09 -0500
Update README with basic instructions
Diffstat:
M | README | | | 46 | +++++++++++++++++++++++++++++++++++++++++++--- |
1 file changed, 43 insertions(+), 3 deletions(-)
diff --git a/README b/README
@@ -1,10 +1,50 @@
-# spotilist
+# Spotify Playlist Exporter
-Spotify Playlist Exporter
+A small tool to export Playlist track listings (with
+some minimal metadata) as plaintext for archival
+purposes.
## Dependencies
-On OpenBSD 7.6 the following packages are required:
+Outside standard Perl 5 core modules, the libwww
+and Mojolicious modules are required.
+
+On OpenBSD 7.6 the following packages are sufficient:
- p5-libwww
- p5-LWP-Protocol-https
+- p5-Mojolicious
+
+## Running
+
+Spotify uses Oauth2.0 to get authentication tokens scoped
+to a specific set of permissions and user session (by
+having the user log in and accept said permissions).
+
+This login process requires a browser. As such, the program
+is split into two parts: the authorization flow, and the
+CLI itself.
+
+### Authorization
+
+Create a Spotify Developer account and an Application.
+Put the Client ID and Secret in the SPOTIFY_CLIENT_ID
+and SPOTIFY_CLIENT_SECRET environment variables. Make
+sure http://localhost:3000/auth is the redirect URL.
+
+Next, run `get-token.pl` as a Mojolicious server:
+
+ $ morbo get-token.pl
+
+And visit localhost:3000 in the browser. Click the link
+and it should log in, redirect back, and dump the token
+into the web page.
+
+### Playlist Exporter (CLI)
+
+Put the token from the browser in the environment as
+SPOTIFY_TOKEN and run the script cli.pl:
+
+ $ ./cli.pl your-spotify-username
+
+The listings will be written to the current directory.