npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

scrobbler

v1.0.1

Published

Manual bulk scrobbler from text or json file to LastFM.

Downloads

6

Readme

scrobbler

Manual bulk scrobbler from text or json file to LastFM.

Install

npm install -g scrobbler

Run

You will need to have LastFM developer account Check http://www.last.fm/api on how to obtain API key and Secret.

Create secret.json and fill all the values:

{
  "LASTFM_API_KEY": "Your LastFM API key",
  "LASTFM_SECRET": "Your LastFM App secret",
  "LASTFM_USER": "Your LastFM username",
  "LASTFM_PASSWORD": "Your LastFM password"
}

Or run scrobbler with these ENV variables:

export LASTFM_API_KEY=123
export LASTFM_SECRET=123
export LASTFM_USER=123
export LASTFM_PASSWORD=123 

scrobbler tracks.json

Note that it will create itunes folder to keep database. Next time you should run it in the same folder again and it will not submit same tracks again.

Input file

scrobbler only works with JSON files that have exactly this format:

[
  {
    "id": "track|Dopelord|Children Of The Haze|Navigator",
    "name": "Dopelord [Children Of The Haze] Navigator",
    "artist": "Dopelord",
    "album": "Children Of The Haze",
    "date": "2017",
    "track": "Navigator",
    "playCount": 1,
    "lastPlayed": 1486955443505,
    "loved": true
  },
  {
    "id": "track|Dopelord|Children Of The Haze|Scum Priest",
    "name": "Dopelord [Children Of The Haze] Scum Priest",
    "artist": "Dopelord",
    "album": "Children Of The Haze",
    "date": "2017",
    "track": "Scum Priest",
    "playCount": 1,
    "lastPlayed": 1486955929505,
    "loved": false
  }
]

You may add more fields for every track, they will be inserted to database as is, but not used for submissions.

Then run scrobbler to submit all tracks to LastFM

scrobbler tracks.json

Text files

scrobbler has special tool to convert manually entered text file:

scrobbler-convert tracks.txt tracks.json

tracks.txt must have this format:

14:10 Dopelord - Children Of The Haze (2017)
*1. Navigator - 0:00
2. Scum Priest - 8:06
3. Children of the Haze - 14:17
4. Skulls and Candles - 21:45
5. Dead Inside (I&II) - 25:33
6. Reptile Sun - 34:53


15:20 Ritual Haze - Machine Sun (2017)
1. Fire - 0:00
2. Machine Sun - 8:27
3. Dark Night - 14:30
4. Desert Alias - 22:00
*5. Dither Haze - 29:17

Where 14:10 and 15:20 are start times today, * before track number is loved flag. Track times are starting times of each track relative to the beginning.

This track list format originally comes from full albums or mixes on Youtube.

Extras

scrobbler-addtime

Adds two times mm:ss. Can be used to calculate track start time in a mix.

scrobbler-addtime 10:00 12:30
22:30

scrobbler-addtime 2:13 3:51
6:4

scrobbler-addtime 24:35 128:56
153:31

PS

Check out itunes-scrobbler tool if you want to automatically bulk scrobble play counts and loved tracks from your iTunes library