Rigellute / spotify-tui

Spotify for the terminal written in Rust 🚀
MIT License
17.53k stars 521 forks source link

Export playlists to text formats #93

Open mrcnski opened 5 years ago

mrcnski commented 5 years ago

I'd like to be able to save entire playlists with each song in Title - Artist format, something I'm not able to do in Spotify. Hopefully this isn't against their TOS.

I see this requiring a new screen where the user can pick from different output formats (the default can be Spotify's own format, which is a bunch of links to open.spotify.com for each track).

I would love to help out with this myself.

Rigellute commented 5 years ago

Hmm... not sure I quite understand the feature. Is this different from "following" a playlist and then viewing that playlists tracks?

To save all the tracks in a playlist would be a bit tricky as spotify has a limit of 50 tracks per request - doable though.

mrcnski commented 5 years ago

Ah my bad, didn't explain it well.

I just want to be able to get a list of all the songs in a playlist, in various textual formats - for importing into Apple Music etc., or just for safekeeping in the eventuality that Spotify disappears and I lose half a decade of saved songs. So far I've not been able to figure out how to do this in Spotify -- there are a bunch of (closed-source) third-party programs that do this, but I don't trust any of them.

Rigellute commented 5 years ago

Ah I see! Thanks for the clarification.

Will give this some thought.

alichtman commented 5 years ago

@m-cat This may be what you're looking for: https://github.com/caseychu/spotify-backup

Not sure this really falls within the scope of this project.

mrcnski commented 5 years ago

Thanks, a few problems with that though:

  1. It didn't save my "Liked Songs", which is what I'm interested in getting.
  2. Last commit 5 years ago...?
  3. Running this Python script is not very user-friendly.
  4. I don't want all my playlists. The way I see it, with spotify-tui I would be able to open a playlist of my choice, where I would have the option to bring up an export dialog and choose a format.
  5. And, it seems better to have one integrated tool that does this rather than two separate tools, no? You would have to authenticate with Spotify twice.
jessebett commented 5 years ago

I would also be interested in this, and spotify-backup isn't great for the reasons @m-cat outlined.

@alichtman your concern that this doesn't fall in the scope of this project is valid. However, it is a standard feature of cli tools to provide a way to pipe text to standard output. This would be sufficient and valuable feature.

It doesn't need to be specific to Playlists. I would appreciate a standard implementation that pipes the content of the current view to standard output. This could occupy the | keyboard shortcut.

In the case of playlists or other views where the number of elements is too large to fit into the view and requires (currently) ctrl-d/u scrolling. This is related to #11, but I would expect the | to also accumulate the content as though I manually scrolled through to the bottom.

If the worry is that someone might try to do this in a way that would over-ping the API, e.g. piping Liked Songs, then possibly set a default limit which can be overridden in the user's config?

alichtman commented 5 years ago

@alichtman your concern that this doesn't fall in the scope of this project is valid. However, it is a standard feature of cli tools to provide a way to pipe text to standard output. This would be sufficient and valuable feature.

Yeah, actually, agreed. Disregard my earlier comment.

@m-cat Good points.