Do you like to vote in the Australian music competition "Triple J's Hottest One-Hundred" but you don't remember what songs you've listened to that came out last year? Well, assuming you have a Last.fm account, this tool can help you generate a list of all the eligible songs you've listened to in the last year.
- Clone or download the repo โ
hohh
is not published to PyPI yet. cp example.env .env
- Setup a Last.fm API Account.
Follow the steps here to create one, then put your API Key and Shared Secret in your .env
file.
- Setup a Spotify API App
This is only needed to retrieve release dates for tracks, as Last.fm has shitty
data. This step is optional if you also supply the -s/--no-spotify
CLI flag.
If you don't already have a Spotify account make one first, then go here to create an API app. Once you have done that, put your Client ID and Client Secret in your .env
file.
- Install dependencies via Poetry.
This CLI is a Python package and it has a few important dependencies. Ensure you have
Poetry installed, then run poetry install
to setup a
local virtual environment.
Once you've done the setup steps above once, you can run the CLI for any
Last.fm user who has public listen history and your own account. Use the provided
Taskfile
to run the CLI or export your .env
variables into your shell and then run
the CLI.
task hohh -- nadock
Title, Artist, Date
"Sideways", "Carly Rae Jepsen", "2022-10-21 00:00:00+11:00"
"Joshua Tree", "Carly Rae Jepsen", "2022-10-21 00:00:00+11:00"
The only argument to CLI is the username of the Last.fm user you want to retrieve stats for.
The results are printed in CSV format so you can redirect the results into a file
like task hohh -- $user > results.csv
.
Because we have to try and pair tracks from two distinct systems (ie: Last.fm and
Spotify), the resulting list may have Date
values that are empty if no result could
be found in Spotify. Additionally, if the Spotify search returned the "wrong" track
then that track's release date will be used and will be different to the actual release
date.
If you want to just get all your listen history without filter via Spotify, use
the -s/--no-spotify
CLI flag.
This was built pretty much all in one day, and in it's current state it almost certainly has ugly bugs and confusing errors. If you find any of them please open an PR or issue.
Also, for the same reasons this package is not currently published to PyPI. The only way to use it is to clone the repo and run it locally yourself.