A fetch tool for Spotify
Project description
━━━━━━ ❖ ━━━━━━
❖ Information
SpotiFetch is a simple fetch tool to display info about your Spotify profile using the spotify API
❖ Requirements
Register an app on the Spotify developer dashboard here
Edit the app settings and set http://127.0.0.1:9090
as the redirect URI
Take a note of your Client ID and Client Secret
Put the following in your .bashrc
or .zshrc
or the equivalent for your shell
export SPOTIPY_CLIENT_ID='insert-your-spotify-client-id-here'
export SPOTIPY_CLIENT_SECRET='insert-your-spotify-client-secret-here'
export SPOTIPY_REDIRECT_URI='http://127.0.0.1:9090'
❖ Installation
Install from pip
$ pip3 install spotifetch
Install from source
- First, install poetry
$ git clone https://github.com/dotzenith/SpotiFetch.git
$ cd SpotiFetch
$ poetry build
$ pip3 install ./dist/SpotiFetch-0.4.3.tar.gz
❖ Usage
If the instructions in the Requirements section are followed properly, SpotiFetch will ask you to log in and give permissions to fetch stats the first time it's used. Login is not required after the first use.
Usage: spotifetch [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
profile Fetch stats for the user profile
top-artists Fetch user's top artists
top-tracks Fetch user's top tracks
SpotiFetch can be used like any other fetch tool
$ spotifetch profile # fetches profile stats
$ spotifetch top-artists # fetches your top five artists
$ spotifetch top-tracks # fetches your top five songs
The top artists and tracks depends on the time-frame. By default, SpotiFetch fetches your top artists in the short term, but mid term, and long term are also available using the --term
/-t
option.
$ spotifetch top-artists -t short # fetches top artists in the short term
$ spotifetch top-artists -t mid # fetches top artists in the mid term
$ spotifetch top-artists -t long # fetches top artists in the long term
The
--term
/-t
option is available for all three of the commands
SpotiFetch supports --no-random
/-n
option to print the spotify ascii art with a green outline instead of a using a random color from the colorscheme
$ spotifetch profile # prints spotify art with random color
$ spotifetch profile -n # prints green spotify art
The
--random
/-r
option is also available for all three of the commands
The --all-artists
/-a
option can be used to display all artists on a track instead of just displaying one
$ spotifetch profile # Displays only one artist for a track
$ spotifetch profile --all-artists # Displays all artists for a track
The
--all-artists
/-a
option is available for theprofile
andtop-tracks
commands
SpotiFetch can be used with a variety of different color schemes.
SpotiFetch uses catppuccin as it's default color scheme, but a different one can be specified using the
--color
/-c
option.
For example:
$ spotifetch profile # uses catppuccin
$ spotifetch profile -c nord # uses nord
The
--color
/-c
option is available for all three of the commands
Supported color schemes as of now:
- catppuccin - latte, frappe, macchiato, mocha
- nord
- dracula
- gruvbox
- onedark
- tokyonight
- ayu
- palenight
- gogh
If you're a pywal user, the --pywal
option can be used to match the SpotiFetch color scheme with the one generated by pywal
$ spotifetch profile --pywal # Uses color scheme generated by pywal
The
--pywal
option is available for all three of the commands
NOTE: In order to use the
--pywal
option, thecolors.json
file must be present in$HOME/.cache/wal/
(colors.json
is generated automatically when pywal is used)
SpotiFetch also supports dynamically generated colorschemes using the --art
option
$ spotifetch profile --art # Generates colorscheme based on the cover art of the recently played song
$ spotifetch top-artists --art # Generates colorscheme based on the profile image of the top artist
$ spotifetch top-tracks --art # Generates colorscheme based on the cover art of the top track
If SpotiFetch can't generate a colorscheme for any reason, it will fallback to the colorscheme passed in as an option, or the default colorscheme of catppuccin
❖ About SpotiFetch
SpotiFetch is the direct result of browsing too many unix subreddits and general interest in cli tools. The ascii art for spotify is a WIP and contributions to the logo are welcomed and encouraged!
❖ What's New?
0.4.4 - Dependency updates
Project details
Release history Release notifications | RSS feed
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
Hashes for spotifetch-0.4.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d3e93322848aababf8cb1c3a65bdd65ce46a16bf6394758b603e0363fd907d2 |
|
MD5 | 9021fbc28f1b63fac68cdd0b22891024 |
|
BLAKE2b-256 | dc01222a8d440ff9acd3bac7d625600cd02c0bed4824264a5e7e070dd4505aef |