heismauri / rolling-friend-chart

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 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

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)

About

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

License:MIT License


Languages

Language:Python 100.0%