GithubHelp home page GithubHelp logo

npoleon's Introduction

npoleon

Npoleon is a command-line utility that helps you scrobble tracks that are being, have been, or will be played on NPO Radio 1, 2 and 3FM to Last.fm, a social network centred around music that – like 3FM – inexplicably still exists despite more than a decade of declining market share.

This tool was written over the course of several train rides in the Netherlands, mainly as a fun way to learn more about Go and to find out if I still dislike the language. Sadly it turns out I do, so don’t expect (m)any updates unless something is completely broken. Although Npoleon has a few rough edges here and there, I’ve been dogfooding Npoleon for a while now so you probably shouldn’t run into any major issues.

Installation

It only takes three steps to set up Npoleon for scrobbling.

First, download and install the latest version of Npoleon by downloading the right binary for your platform. Ensure that the binary is somewhere in your path (e.g. /usr/local/bin and has the executable bit set (using chmod +x).

You will need to create an API account in order to access Last.fm’s Track API. It doesn’t really matter what you enter here, because you will be the tool’s only user.

Once you have created an API account, Last.fm will show you a key and a secret. Write these to ~/.npoleon/config as follows, making sure to replace the dummy values with your actual key and secret):

LASTFM_API_KEY=0123456789abcdef0123456789abcdef
LASTFM_API_SECRET=0123456789abcdef0123456789abcdef

Finally, run this command and follow the instructions:

npoleon login

This gives your specific instance of Npoleon access to your Last.fm account and allows it to scrobble tracks on your behalf. You only need to do this once.

Usage

Npoleon can scrobble tracks for three NPO radio stations: nporadio1, nporadio2, and npo3fm (or radio1, radio2 and 3fm). The examples below assume that you want to scrobble tracks for 3fm.

To scrobble a single track that’s currently being played, execute:

npoleon scrobble 3fm --once

To keep scrobbling tracks indefinitely (at least until you terminate the command), simply execute:

npoleon scrobble 3fm

You can also scrobble all tracks that have been played since a particular moment:

npoleon scrobble 3fm --from "2024-01-20 14:30:00"

Or ask Npoleon to scrobble tracks until a specific time:

npoleon scrobble 3fm --until "2024-01-20 20:55:00"

--from and --until can be combined to scrobble tracks for specific periods:

npoleon scrobble 3fm --from "2024-01-20 14:30:00" --until "2024-01-20 20:55:00"

npoleon's People

Stargazers

 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.