Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jliuhtonen/lastfm-dump
Export scrobbles from Last.fm to MongoDB
https://github.com/jliuhtonen/lastfm-dump
Last synced: about 1 month ago
JSON representation
Export scrobbles from Last.fm to MongoDB
- Host: GitHub
- URL: https://github.com/jliuhtonen/lastfm-dump
- Owner: jliuhtonen
- License: mit
- Created: 2015-04-10T18:58:37.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2018-08-28T18:00:05.000Z (over 6 years ago)
- Last Synced: 2024-10-29T21:22:13.594Z (3 months ago)
- Language: Haskell
- Homepage:
- Size: 54.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lastfm-dump
Lastfm-dump is a tool that fetches your listening data from Last.fm and inserts them to Mongo DB so you can make all sorts of interesting stuff with your listening data.
The resulting BSON objects will look like this:
```
{
"_id": ObjectId("5522c37ca7956d6b02000010"),
"name": "Carrie & Lowell",
"artist": {
"name": "Sufjan Stevens",
"mbid": "01d3c51b-9b98-418a-8d8e-37f6fab59d8c"
},
"album": {
"name": "Carrie & Lowell",
"mbid": "87b4a614-d53d-4495-b176-5d4f2bb353e6"
},
"url": "http://www.last.fm/music/Sufjan+Stevens/_/Carrie+&+Lowell",
"scrobbledAt": ISODate("2015-04-05T20:56:41Z")
}
```## Compiling
Install stack and...
```
stack setup
stack build
```Or use Docker:
`docker build -t lastfm-dump .`## Usage
To sync your data to Mongo, start your mongod and run `lastfm-dump` with the following env vars set either in `.env` file or environmental variables:
```
MONGODB_PASSWORD=
MONGODB_USER=
MONGODB_DBNAME=
MONGODB_ADDRESS=
MONGODB_PORT=
LASTFM_API_KEY=
PAGE_SIZE=200
LASTFM_USER=myUser
```