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

spotivy

v0.6.0

Published

Spotify music videos downloader

Downloads

12

Readme

Spotivy

Spotify music videos downloader

Application preview

Download all tracks from your Spotify playlists as videos or MP3.

How it Works

Spotivy gets the track information from Spotify and then search YouTube in the format of ${artist_name} - ${track_name}.

To decide which video to download from the returned list, it applies a very simple test for each item:

  • video was published by any VEVO affiliated channel?
  • video channel contains official in its name?
  • video contains official in its title?

If any of these assertions is true for the video being tested, this is the media that will be downloaded.

It's not precise, but it does the job 90% of the time. Any suggestion is welcome!

Configuration

  1. Install the CLI

    npm install -g spotivy
  2. Follow the instructions in the init command:

    spotivy init

    Basically, you'll need to create the keys to use Spotify and YouTube APIs, and configure the tool with them:

    1. Create an YouTube API key and put in the specified prompt.
    2. Create an application on Spotify Developers website, get the Client ID and Client Secret values, and do the same when requested by the tool.
    • Note: You can also pass the credentials in each command call:
    spotivy playlist danguilherme --spotify-client-id=clientid --spotify-client-secret=clientsecret --youtube-key=ytkey

Usage

spotivy help

Commands

Global Options

These options are accepted by any command.

| Option | Description | Default | | ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | | -o, --output | Location where to save the downloaded media. | ./media | | -f, --format | The format of the file to download. Either video or audio. | video | | -q, --quality | The quality in which the video should be downloaded (ignored if --format=audio). Options: 144p, 240p, 360p, 720p, highest, lowest. | highest | | --flat | Indicates if the files must be saved in one single folder (no subfolders). Useful if you're downloading multiple playlists. | - | | -a, --audio | Flag to download as audio; equivalent to --format=audio. | - | | -v, --verbose | Show detailed logs. | - |

Init

Configure the tool with the keys from Spotify and YouTube.

spotivy init

spotivy help init

Download playlists

Download any public playlists from a given user.

Accepts all global options.

spotivy playlist <username> [playlist_ids...] # user id and playlist id, zero or more
spotivy playlist danguilherme # download all public playlists from the user
spotivy playlist danguilherme 34X8sCTs81AWXD8hhbTZVn
spotivy playlist danguilherme 3BG5tkH8g77ClLThZiosGD 3Zpkeg6VE5wj5eghBxv0R6 -a # 2 playlists, audio only

spotivy help playlist

Download single tracks

Download any track you want by its Spotify ID.

Accepts all global options.

spotivy track <track...> # tracks list
spotivy track 5tXyNhNcsnn7HbcABntOSf
spotivy track 0SFJQqnU0k42NYaLb3qqTx 31acMiV67UgKn1ScFChFxo 52K4Nl7eVNqUpUeJeWJlwT 5tXyNhNcsnn7HbcABntOSf -a # 4 tracks, audio only

spotivy help track

License

Spotivy is under MIT License.