spot2txt

Export Spotify Playlist Listings as Plaintext
git clone git://git.alexkarle.com.com/spot2txt
Log | Files | Refs | README | LICENSE

README (1315B) [raw]


      1 # spot2txt
      2 
      3 A small tool to export Spotify Playlist track listings (with
      4 some minimal metadata) as plaintext for archival purposes.
      5 
      6 ## Dependencies
      7 
      8 Outside standard Perl 5 core modules, the libwww
      9 and Mojolicious modules are required.
     10 
     11 On OpenBSD 7.6 the following packages are sufficient:
     12 
     13 - p5-libwww
     14 - p5-LWP-Protocol-https
     15 - p5-Mojolicious
     16 
     17 ## Running
     18 
     19 Spotify uses Oauth2.0 to get authentication tokens scoped
     20 to a specific set of permissions and user session (by
     21 having the user log in and accept said permissions).
     22 
     23 This login process requires a browser. As such, the program
     24 is split into two parts: the authorization flow, and the
     25 CLI itself.
     26 
     27 ### Authorization
     28 
     29 Create a Spotify Developer account and an Application.
     30 Put the Client ID and Secret in the SPOTIFY_CLIENT_ID
     31 and SPOTIFY_CLIENT_SECRET environment variables. Make
     32 sure http://localhost:3000/auth is the redirect URL.
     33 
     34 Next, run `get-token.pl` as a Mojolicious server:
     35 
     36 	$ morbo get-token.pl
     37 
     38 And visit localhost:3000 in the browser. Click the link
     39 and it should log in, redirect back, and dump the token
     40 into the web page.
     41 
     42 ### Playlist Exporter (CLI)
     43 
     44 Put the token from the browser in the environment as
     45 SPOTIFY_TOKEN and run the script cli.pl:
     46 
     47 	$ ./cli.pl your-spotify-username
     48 
     49 The listings will be written to the a new "out" directory.