Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/elivlo/spotifyhistorysaver
This service will fetch and save your track history periodically.
https://github.com/elivlo/spotifyhistorysaver
go golang history save spotify
Last synced: 15 days ago
JSON representation
This service will fetch and save your track history periodically.
- Host: GitHub
- URL: https://github.com/elivlo/spotifyhistorysaver
- Owner: elivlo
- License: gpl-2.0
- Created: 2021-03-17T17:19:13.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-08-22T19:43:06.000Z (about 3 years ago)
- Last Synced: 2024-07-04T15:00:32.461Z (4 months ago)
- Topics: go, golang, history, save, spotify
- Language: Go
- Homepage:
- Size: 303 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Spotify History Saver
This service is used to save your Spotify history every 45 minutes. The fetched songs are saved in a MySQL database.
It uses OAuth to log into Spotify.## Setup
#### You will need gvm (go version manager)1. Create a Spotify application at: https://developer.spotify.com/dashboard/applications
2. Run `bin/activate` and build with `go build`
3. Create `.env` file out of `.env.example` and add client credentials
+ Don't forget to create database and load schema with `./SpotifyPlaybackSaver -create_db` and `./SpotifyPlaybackSaver -migrate`
+ Also add db credentials to `.env` file
4. Generate OAuth token with `./SpotifyPlaybackSaver -login`
+ That will generate a `token.json` file with credentials
5. Start `./SpotifyPlaybackSaver` and enjoy!### Database schema
https://dbdiagram.io/d/6055e6a2ecb54e10c33c63ac![Database](assets/SpotifyHistoryPlaybackSaver.png "Database")
### Many thanks to these libraries that made my life easier:
+ https://github.com/zmb3/spotify
+ https://github.com/gobuffalo
+ https://github.com/antonfisher/nested-logrus-formatter
+ https://github.com/sirupsen/logrus