Save a snapshot of your day as a Spotify playlist.
Since music_snapshot
is a command line tool, the recommended installation method
is via pipx:
$ pipx install music_snapshot
Of course, you can just install it directly from PyPI (ideally, inside a virtualenv):
$ python -m pip install music_snapshot
To use music_snapshot
you need to authorize it with both Spotify and Last.fm.
To get Spotify client ID and secret, create an OAuth client in
Spotify developer dashboard (with the "Redirect URI" set to
http://localhost:6600/music_snapshot
).
To get Last.fm API keys, you need create a new Last.fm API account.
After obtaining all of the above, you need to run music_snapshot authorize
which will save your config data in ~/.music_snapshot
and allow you to create
new music snapshots with music_snapshot create
subcommand.
The default subcommand is create
, which helps you create a new music snapshot
(Spotify playlist).
You can see all available subcommands and options by running music_snapshot --help
:
$ music_snapshot --help
Usage: music_snapshot [OPTIONS] COMMAND [ARGS]...
Save a snapshot of your day as a Spotify playlist.
Have you ever just let Spotify algorithm do its thing, keep going long after your
queue has finished and ended in a place you'd like to go back to? I'm here to help you
do just that.
A 'music snapshot' is a Spotify playlist that encapsulates a part of your music
playing history.
Unfortunately, because of Spotify API limitations (no accessible history of played
songs) the song history comes from your Last.fm account.
To use the app, you need to first create a new Spotify OAuth app in its developer
dashboard and get Last.fm API keys by creating a new API account. You can then use
those values in the authorize subcommand, which will also save the underlying data on
your disk.
╭─ Options ────────────────────────────────────────────────────────────────────────────╮
│ --version Show the version and exit. │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────────────╮
│ authorize Authorize music_snapshot with Spotify and Last.fm. │
│ create Create a new music snapshot (Spotify playlist). │
╰──────────────────────────────────────────────────────────────────────────────────────╯
Developed and maintained by Paweł Adamczak.
Source code is available at GitHub.
If you'd like to contribute, please take a look at the contributing guide.
Released under Mozilla Public License 2.0.