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

@dworkman/styc

v1.0.2

Published

Spotify to Youtube Converter. A CLI package that will convert a spotify playlist into a youtube one.

Downloads

1

Readme

styc - Spotify to Youtube Converter

A CLI package that will convert a spotify playlist into a youtube one.

Everyone loves watching the video clips to their favourite songs. As a passionate music lover, I wanted an easy way to convert my Spotify playlists into Youtube playlists. As this is a CLI package, you will need to have an understanding of npm, terminal and how passing arguments works to utilise this program.

While Spotify's API is cool and lets you collect all of the playlist information you want via multiple API calls to the offSet endpoints, Google have stricter limits on their API. Because of these limits, we are not able to convert large Spotify playlists as I'd originally hoped.

If you have a way of increasing Google API limits, feel free to fork this repo and remove the limitation I've placed on the data mentioned in caveat 2.

Caveats

  1. If your Gmail PW contains special terminal characters that need escaping, the puppeteer automatic login will fail and you'll need to manually enter your password at that stage.

  2. Youtube has a 10,000 point quota in place for Youtube API. A single search = 100. Therefore only 100 searches per day allowed. You can read more about the limits here > https://developers.google.com/youtube/v3/getting-started#quota Because of this, I've set the maximum playlist size to 40. Although the application itself is built to handle spotify playlists of any size.

  3. You need to make sure you have your new Youtube Playlist created and something added to the playlist. Without something added to the playlist the API will not be able to detect the playlistId and therefore will not work.

  4. Ensure you set your Google URI to http://localhost:8080/oauth2callback as the cli will run a server on that port and expect the callback to hit that endpoint.

Installing

npm i @dworkman-styc -g

Usage

styc --sc="keyValue" --scs="keyValue" --s="keyValue" --yp="keyValue" --gc="keyValue" --gs="keyValue" --gu="http://localhost:8080/oauth2callback" --gm="[email protected]" --gp="emailPassword"

Security

When dealing with API secrets and passwords security should always be a concern. Thus I will quickly mention a few points.

  1. This is a server side application that runs in a terminal session and therefore has incredibly low risk of your input's being subject to scraping.

  2. The entire code base is posted on my github. You are able to see that I am NOT storing any cli inputs, I'm just using global variables to temporarily store the values while the program executes and then once the program terminates those values would no longer exist in memory.