GithubHelp home page GithubHelp logo

hohh's Introduction

Hottest One-Hundred Helper

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.

Setup

  1. Clone or download the repo โ€” hohh is not published to PyPI yet.
  2. cp example.env .env
  3. 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.

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

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

Usage

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.

A Note on Accuracy

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.

MVP Warning

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.

hohh's People

Contributors

dependabot[bot] avatar nadock avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.