Metadata-Version: 2.1
Name: spotube
Version: 0.0.1
Summary: A Python package to download Spotify playlists locally including the cover art, metadata and lyrics by leveraging the Spotify, YouTube and Genius APIs.
Project-URL: Homepage, https://github.com/GiorgosNik/spotube-package
Project-URL: Bug Tracker, https://github.com/GiorgosNik/spotube-package/issues
Author-email: Giorgos Nikolaou <giorgosnl17@gmail.com>
License-File: LICENCE
Classifier: License :: Free for non-commercial use
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.7
Requires-Dist: anyio
Requires-Dist: async-timeout
Requires-Dist: beautifulsoup4
Requires-Dist: brotli
Requires-Dist: certifi
Requires-Dist: charset-normalizer
Requires-Dist: coverage
Requires-Dist: deprecation
Requires-Dist: eyed3
Requires-Dist: filetype
Requires-Dist: h11
Requires-Dist: httpcore
Requires-Dist: httpx
Requires-Dist: idna
Requires-Dist: lyricsgenius
Requires-Dist: mutagen
Requires-Dist: packaging
Requires-Dist: pillow
Requires-Dist: pycryptodomex
Requires-Dist: redis
Requires-Dist: requests
Requires-Dist: rfc3986
Requires-Dist: six
Requires-Dist: sniffio
Requires-Dist: soupsieve
Requires-Dist: spotipy
Requires-Dist: toml
Requires-Dist: tqdm
Requires-Dist: urllib3
Requires-Dist: websockets
Requires-Dist: youtube-search-python
Requires-Dist: yt-dlp
Description-Content-Type: text/markdown

# Spotube

Spotube is a Python package that allows the user to download local `.mp3` copies of Spotify playlists, including cover art, artist information and lyrics.

## Description

The package can be used to download Spotify playlists, retrieving and pairing each song with the cover art as seen on Spotify, as well as any relevant metadata.
The user provides the link to a public spotify playlist, API keys for Spotify and Genius, and, optionally the directory to save the downloaded songs.
The application will then:

- Query the Spotify API for information on each song in the playlist, including the official name, artists, album cover art etc.
- Using the song name and artist(s), search for, and select the most relevant song video on Youtube. If possible, the application will avoid remixes, covers and video clip versions.
- Using the most relevant link, download the video in the highest possible quality, and convert to .mp3 format.
- Query the LyricsGenius API to retrieve the song lyrics, if available.
- Edit the .mp3 tags of the downloaded song to set the artist and album information, add the lyrics and set the cover art.

## Obtaining API keys

For instructions on how to generate the two sets of API keys needed to run the application, please refer to:

- [The Spotify API guide](https://developer.spotify.com/documentation/web-api/)
- [The Genius API guide](https://docs.genius.com/)

## Dependencies

In order to convert the YouTube videos to `.mp3` format, you need to have ffmpeg installed in your system.
To do this, follow the instructions relevant to your system:

### Ubuntu:

```
sudo apt install software-properties-common
sudo apt update
sudo add-apt-repository ppa:jonathonf/ffmpeg-4
sudo apt install ffmpeg
```

### Windows:

- Download ffmpeg from the [ffmpeg downloads page](https://ffmpeg.org/download.html)
- Extract the downloaded archive
- Add the directory where ffmpeg was extracted to the PATH

## Installation

To install the package using pip:

```
pip install spotube
```

## Instructions and Examples

This section is under construction.

## Disclaimer

Spotube is aimed strictly at personal use, as per the YouTube, Spotify and LyricsGenius license agreements. Sharing the
content collected by using this application, or using it for profit is strictly prohibited. For more information, please read the LICENSE file included with this distribution.
