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

spotituby

v1.0.0

Published

Download music from Spotify and Youtube playlists or tracks

Readme

Spotituby

GitHub package.json version npm

Spotituby is a Node.js-based application that simplifies downloading music from Spotify playlists and YouTube. Designed for command-line enthusiasts, it provides a clean interface to download tracks and playlists in MP3 format.

Features

  • Spotify Integration:

    • Fetches user playlists and tracks directly from Spotify.
    • Requires authentication using Spotify API.
    • Allows selection of individual tracks or entire playlists for download.
  • YouTube Integration:

    • Downloads tracks or playlists using YouTube links.
    • Converts videos to MP3 format with customizable output.

Prerequisites

Ensure the following dependencies are installed:

  1. Node.js and npm: Required for running the application.

    # Check if npm is installed
    npm -v

    Install Node.js from Node.js official site if necessary.

  2. Python 3: Used for creating a virtual environment and downloading YouTube content.

    python3 --version
  3. yt-dlp: Installable through your system package manager or pip.

    # macOS / Linux
    sudo apt install yt-dlp
    
    # Windows (via Chocolatey)
    choco install yt-dlp
  4. mandb: For manual page installation.

    sudo apt install man-db

Installation

  1. Clone the repository:

    git clone <repository-url>
    cd Spotituby
  2. Install dependencies:

    npm install
  3. Run the installation script to set up the environment and application dependencies:

    sudo ./install.sh

NOTE: This script has only been tested on Mac, beware

  1. Set up Spotify API credentials:
    • Visit Spotify Developer Dashboard.
    • Create a new app and note the Client ID and Client Secret.
    • Add the redirect URI: http://localhost:3000/callback.
    • Save your credentials in a .env file in the root directory of this app:
      SPOTIFY_CLIENT_ID=<your-client-id>
      SPOTIFY_CLIENT_SECRET=<your-client-secret>

Usage

1. Running the Application

node index.js --mode cli --url <spotify-or-youtube-url>

NOTE: This app has two modes, cli and server. Server mode is still not fully implemented. Use cli only for now

2. Examples

  • Download a Spotify playlist:

    node index.js --mode cli --url https://open.spotify.com/playlist/4nT7b2XU4sVWp8Rt7A6WqI
  • Download a YouTube playlist:

    node index.js --mode cli --url https://www.youtube.com/playlist?list=PLv9ZK9k7ZDjW5mDlMQm4eMjR4kxY9e8Ji

Troubleshooting

  • Invalid Spotify Token:

    • Ensure your .env file contains valid Spotify API credentials.
    • Clear the token file (TOKENFILE) and reauthenticate.
  • YouTube Download Issues:

    • Verify yt-dlp is installed and accessible.

Disclaimer

Spotituby is intended for personal use only. It's a hobby project lmao 😂