Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/heismauri/rolling-friend-chart

A Python3 script to make a chart based on your LastFM scrobbles
https://github.com/heismauri/rolling-friend-chart

billboard chart lastfm lastfm-api python3

Last synced: about 2 months ago
JSON representation

A Python3 script to make a chart based on your LastFM scrobbles

Awesome Lists containing this project

README

        

**Rolling Friend Chart** is a Python script that creates a chart based on your friends' recent scrobbles from LastFM. It can create charts for artists, albums and tracks. It uses the [LastFM API](https://www.last.fm/api) to collect the data. You can customize the chart by changing the length of the chart and by showing the detail of it, which is how much each item was scrobbled by the user.

# Environment variables
You need to set the following environment variables `.env` to use this script:
- `LASTFM_API_KEY`: Your LastFM API key
- `MAX_PLAYCOUNT`: The maximum number of plays to be considered for the chart (default: 10)

# Usage & options
```bash
python main.py users [users...] -m {gettoptracks,gettopalbums,gettopartists}
```

## General options
```
-h, --help show this help message and exit
-p, --period period to get the top items from, default: 7day {7day,1month,3month,6month,12month,overall}
-l, --length length of the top list, default: 10 {1-100}
-d, --detail show the detail of the top list
```

# Output

## Example without detail
```
Finished collecting the items from 'USERNAME'
Finished collecting the items from 'USERNAME'
Finished collecting the items from 'USERNAME'
#1. no tears left to cry - Ariana Grande [4.33]
#2. bad idea right? - Olivia Rodrigo [4.28]
#3. MORE - K/DA [4.16]
#4. Howl - CHUU [3.66]
#5. Hold On Tight - aespa [2.67]
#6. Newtopia - Loosemble [2.67]
#7. Sugarcoat (NATTY Solo) - KISS OF LIFE [2.67]
#8. because i liked a boy - Sabrina Carpenter [2.62]
#9. Dance the Night - Dua Lipa [2.62]
#10. El Amor No Duele - Denise Rosenthal [2.62]
```

## Example with detail
```
Finished collecting the items from 'USERNAME'
Finished collecting the items from 'USERNAME'
Finished collecting the items from 'USERNAME'
#1. no tears left to cry - Ariana Grande [4.33], # of plays: USERNAME (5), USERNAME (5), USERNAME (1)
#2. bad idea right? - Olivia Rodrigo [4.28], # of plays: USERNAME (4), USERNAME (3), USERNAME (1)
#3. MORE - K/DA [4.16], # of plays: USERNAME (5), USERNAME (2), USERNAME (1)
#4. Howl - CHUU [3.66], # of plays: USERNAME (4), USERNAME (1), USERNAME (1)
#5. Hold On Tight - aespa [2.67], # of plays: USERNAME (21), USERNAME (1)
#6. Newtopia - Loosemble [2.67], # of plays: USERNAME (8), USERNAME (1)
#7. Sugarcoat (NATTY Solo) - KISS OF LIFE [2.67], # of plays: USERNAME (7), USERNAME (1)
#8. because i liked a boy - Sabrina Carpenter [2.62], # of plays: USERNAME (3), USERNAME (1)
#9. Dance the Night - Dua Lipa [2.62], # of plays: USERNAME (3), USERNAME (1)
#10. El Amor No Duele - Denise Rosenthal [2.62], # of plays: USERNAME (3), USERNAME (1)
```