Skip to main content

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

spotifetch gif

❖ 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

$ 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 the profile and top-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:

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, the colors.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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spotifetch-0.4.4.tar.gz (10.1 kB view hashes)

Uploaded Source

Built Distribution

spotifetch-0.4.4-py3-none-any.whl (8.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page