Skip to main content

Track your Spotify play history.

Project description

Spotify Tracker

Track all the songs you listen to in the Spotify OS X app and save them in a Spotify playlist.

Living in NYC, I spend a fair amount of time underground without cell service. I also listen to a bunch of music on Spotify, and often times I'll have a song stuck in my head that isn't saved on my phone. Bad times, right? So on a Hackday, I decided to solve the problem. I created a history playlist where I would save everything I listen to. That way, when someone recommends the sweet new St. Lucia album at work, and I jam out to it, I don't have to remember to save it or something so I can listen to it on my phone underground.

The rub

Spotify doesn't let you see what a user is currently listening to from their web api. Boo. (There's an issue open on their web api github page that get's a +1 a day or so, if you want to join...) So instead, I hacked together some AppleScript to grab the current song from the OS X Spotify Client. So, at least for now, this is OS X only. ¯_(ツ)_/¯

Installation

It's all setup with pip, so just

pip install spotifytracker

It's written in Python 3, so you'll need that installed. You'll also need to setup a Spotify Application. It's very easy, but you'll have to quickly signup for a developer account. You can create one here. One you have that setup, you can create an app. You'll need to specify a callback url, but it can be anything. Once that's all set, you should create a playlist to save your songs to, and then run

spotifytracker setup

and add your username, Client ID, Client Secret, and Callback URL. You'll then authorize your app, and then be asked to pick the playlist to save your history to.

Then, to run

spotifytracker watch

Development

To run from source, use

python -m spotify_tracker.runner

Contribute

This was a Hackday thing, so I don't have anything specifically planned for this, but if you think it could be better, open a PR!

License

MIT all the way.

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

spotifytracker-0.0.18.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

spotifytracker-0.0.18-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file spotifytracker-0.0.18.tar.gz.

File metadata

  • Download URL: spotifytracker-0.0.18.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

File hashes

Hashes for spotifytracker-0.0.18.tar.gz
Algorithm Hash digest
SHA256 97e5c6ac39f25f4c31702ed0aa5fb92bc3f5893338c7aa8e19c2140ca906d331
MD5 3ffbdbf34bf6a1ed6c432f0fc7f7867c
BLAKE2b-256 3f23c35f0c293476c33b09ff857a612c831fe06cbcf48675c6089b07b2c38d75

See more details on using hashes here.

File details

Details for the file spotifytracker-0.0.18-py3-none-any.whl.

File metadata

  • Download URL: spotifytracker-0.0.18-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

File hashes

Hashes for spotifytracker-0.0.18-py3-none-any.whl
Algorithm Hash digest
SHA256 3a7f0ff4951ca19cbd69f98456950ed4ed7c2c357c9e9c786ac2fa485f1848bc
MD5 e4c6555fd6ed478258504045641f4b5f
BLAKE2b-256 7c7ff3c1fb05211198fa6de3f31d3958303fe71da04fa5e0806771df18b8bb90

See more details on using hashes here.

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