fetch audio metadata from spotify and tag them to your audio files
Project description
tag-from-spotify
tag-from-spotify
is a Python CLI tool to fetch audio metadata from Spotify and tag them to your audio files.
Installation
Since this package is meant to be an end-user app (not a library), it is highly recommended to install with pipx
.
pipx install tag-from-spotify
Of course, you can use pip
as well.
Authorization
1. Create Credentials
To fetch data from Spotify, you have to register this app to your dashboard and create your Client ID and Client Sectet. You will see the detail process on the Spotify Developer page, but note that you won't have to prepare your website URL or a redirection URL.
2. Set Credentials to Environment Variables
Then add your Client ID and Client Secret to your environment variables like this:
export SPOTIPY_CLIENT_ID='your-spotify-client-id'
export SPOTIPY_CLIENT_SECRET='your-spotify-client-secret'
Usage
tfsp DIR ALBUM_ID
- DIR: path to the directory containing audio files to set tags
- ALBUM_ID: the album ID, URI or URL such as the following examples:
- ID: 0WHIgko1oBSbayvwe9tdze
- URI: spotify:album:0WHIgko1oBSbayvwe9tdze
- URL: https://open.spotify.com/album/0WHIgko1oBSbayvwe9tdze
Development
Create an .env
that contains Spotify Client ID and Client Secret for the repository root (so you don't have to set them to the environment variables)
SPOTIPY_CLIENT_ID=piyopiyopiyopiyo
SPOTIPY_CLIENT_SECRET=megamegamegamega
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file tag-from-spotify-0.4.1.tar.gz
.
File metadata
- Download URL: tag-from-spotify-0.4.1.tar.gz
- Upload date:
- Size: 16.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74f681c4ae2fe857607030d80b0684895cd06df2d1f9f8a73e849a3082af084d |
|
MD5 | 57e93e431aa8a025a2f9d5273e71b62d |
|
BLAKE2b-256 | af1cd0570bb2d477ddb7262c98b296d1878d5e3c30eaa7dd941b6936b8ba3388 |
File details
Details for the file tag_from_spotify-0.4.1-py3-none-any.whl
.
File metadata
- Download URL: tag_from_spotify-0.4.1-py3-none-any.whl
- Upload date:
- Size: 16.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0faae2bc7d35581a9071b937bf3e821a6efe20ae44dac20f79cab8ca61df5945 |
|
MD5 | 88e39caed53f1512208f658a1c33fc47 |
|
BLAKE2b-256 | 47f3812bd873de673f9d41a6a53bb04224035a674cfc6160888c6ae9b5f14e8f |