Spotify-stats is a small program made to display your top 10 tracks and artists from last 4 weeks (short term), last 6 months (medium term) and all time (long term).
Libraries used:
- PyQt5
- Spotipy - Python library for the Spotify Web API
- Config location:
$HOME/.config/spotify-stats/config
- Cache location:
$HOME/.cache/spotify-stats
- Logs location:
$HOME/.cache/spotify-stats/log/spotify-stats.log
Generate Client ID and Client Secret for your account:
- Open Spotify for Developers Dashboard
- Create a new app
- Set callback URIs: default config uses
http://localhost:9090/callback
- Set Client ID and Client Secret (and callback URI, if you changed that) from the Developer Dashboard page to config file (
config.sample
or$HOME/.config/spotify-stats/config
)
It is recommended to set up pyenv and virtualenv.
- Install Python >= 3.6 using pyenv:
pyenv install 3.7.0
- Select installed version of Python in the repository folder:
pyenv local 3.7.0
- Install virtualenv and create new venv for the repository:
$(pyenv which python) -m pip install virtualenv
,$(pyenv which python) -m virtualenv venv
- Activate virtualenv and install dependencies:
. venv/bin/activate
,pip install -r requirements.txt
- Install default config with
make install-cfg
- Run the app with
python src/main.py config.sample
- Build the app with
make build
- Run the built binary with
make run
MIT license. See LICENSE for more information.