https://github.com/plibither8/lastfm-top-artists
📈 Collect user's top artists through time
https://github.com/plibither8/lastfm-top-artists
lastfm
Last synced: about 2 months ago
JSON representation
📈 Collect user's top artists through time
- Host: GitHub
- URL: https://github.com/plibither8/lastfm-top-artists
- Owner: plibither8
- License: mit
- Created: 2020-04-02T08:20:56.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-05-11T09:11:38.000Z (almost 4 years ago)
- Last Synced: 2025-01-15T20:39:04.446Z (3 months ago)
- Topics: lastfm
- Language: JavaScript
- Homepage: https://gist.github.com/plibither8/19e1bf4e5306fe95a8ca62400b07b6fe
- Size: 122 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 📈 Last.fm Top Artists
> Collect user's top artists through time.

## What?
Collect a Last.fm user's [_all time_ top artists](https://last.fm/user/plibither8/library/artists) through all the dates from the time they started scrobbling till now (depending on the set frequency, default is set to `7`: a week).
[See mine](https://gist.github.com/plibither8/19e1bf4e5306fe95a8ca62400b07b6fe) (plibither8) for an example.
## Instructions
You must have Node.js and npm installed.
1. Install dependencies: `npm install`
1. Run the file with your username and desired frequency (optional): `node index `To generate a CSV file of the data collected: `node misc/generate-csv`. Make sure the `data.json` file is there.
### GitHub Actions
To automate this and run it every day and store the data as GitHub Gist, I have enabled [GitHub Actions](.github/workflows/main.yml). It makes use of the [`misc/data-file.js`](misc/data-file.js) file. You can fork the repository and setup your own. Remember to set `GH_TOKEN` and `GIST_ID` environment secrets.
## License
[MIT](LICENSE)