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

tube-manager

v0.6.3

Published

Manage YouTube videos using command line.

Downloads

34

Readme

tube-manager

Manage YouTube videos using command line.

This project was developed to streamline the process of managing YouTube titles, descriptions and tags.

I can do this by hand, why would I use tube-manager?

Because managing this by hand as a channel grows becomes exponentially overwhelming, especially when videos are associated to others and affiliate links are used over and over (what if a link changes?).

Not mentioning associated video links need to be platform-specific and having all this in one place is amazing (and Git friendly).

For example, here’s how the following data from dataset (see sample) is transpiled for YouTube.

Notice how suggested video and affiliate links are automatically expanded?

Data

{
  "id": "YrUSJQq8WOA",
  "publishedAt": "2022-11-03T14:43:45Z",
  "title": "macOS stores a copy of everything one prints forever",
  "description": "In this episode, we explore how macOS stores a copy of everything one prints forever.",
  "tags": ["Privacy", "Security", "macOS"],
  "categoryId": "27",
  "sections": [],
  "suggestedVideos": [],
  "links": [
    {
      "label": "How to disable CUPS pinter job history on macOS",
      "url": "https://sunknudsen.com/privacy-guides/how-to-disable-cups-pinter-job-history-on-macos"
    },
    {
      "label": "Twitter (please follow @superbacked)",
      "url": "https://twitter.com/superbacked"
    },
    {
      "label": "Superbacked (join waiting list)",
      "url": "https://superbacked.com/"
    }
  ],
  "credits": [],
  "affiliateLinks": ["amazon.brotherPrinter"],
  "footnotes": [],
  "support": [
    {
      "label": "Support my research",
      "url": "https://sunknudsen.com/donate"
    }
  ],
  "thumbnailHash": "65c65f74ac181dcffc994d9f75ed88392bdcc434165bc59dda2a0553a0725ac6"
}

YouTube

macOS stores a copy of everything one prints forever

In this episode, we explore how macOS stores a copy of everything one prints forever.

==============================
LINKS
==============================
How to disable CUPS pinter job history on macOS 👉 https://sunknudsen.com/privacy-guides/how-to-disable-cups-pinter-job-history-on-macos
Twitter (please follow @superbacked) 👉 https://twitter.com/superbacked
Superbacked (join waiting list) 👉 https://superbacked.com/

==============================
AFFILIATE LINKS
==============================
Brother HL-L2370DW printer
USA 👉 https://www.amazon.com/dp/B076Q1FK19?tag=sunknudsen06-20

==============================
SUPPORT
==============================
Support my research 👉 https://sunknudsen.com/donate

Installation

Step 1: go to https://console.developers.google.com

Step 2: create project, enable “YouTube Data API v3” and “YouTube Analytics API” APIs and create “OAuth client ID” credentials (required scopes: .../auth/yt-analytics.readonly and .../auth/youtube.force-ssl)

This is where we get the values of youtube.clientId and youtube.clientSecret.

Step 3: run following commands

macOS

npm install -g tube-manager
mkdir -p ~/.tube-manager
cp $(npm root -g)/tube-manager/samples/config.json ~/.tube-manager/config.json
open -a "TextEdit" ~/.tube-manager/config.json

Linux

Heads up: if nano is not installed, please use vi.

sudo npm install tube-manager -g
mkdir -p ~/.tube-manager
cp $(npm root -g)/tube-manager/config.json.sample ~/.tube-manager/config.json
nano ~/.tube-manager/config.json

Step 4: edit config.json

Heads up: for increased security, saving youtube.refreshToken is optional (when omitted, a prompt will ask for refresh token at run time).

Once YouTube client ID and secret are saved to config.json, run tube-manager refresh-token youtube to get values of youtube.accessToken and youtube.refreshToken.

Once access and refresh token are saved to config.json, run tube-manager channels youtube to get value of youtube.channelId.

Usage

$ tube-manager -h
Usage: tube-manager [options] [command]

Options:
  -h, --help                          display help for command

Commands:
  refresh-token [options] <platform>  get refresh token
  channels [options] <platform>       get channels
  stats [options] <platform>          get stats
  video [options] <platform> <id>     get video
  initialize [options]                initialize dataset
  import [options] <id>               import video
  preview [options] <platform> <id>   preview video
  publish [options] [id]              publish video(s)
  help [command]                      display help for command

TL;DR

  1. Initialize dataset using tube-manager initialize
  2. Upload video to YouTube as usual using YouTube Studio
  3. Import video to dataset using tube-manager import <id>
  4. Edit title, description, tags, sections, suggestedVideos, links, credits, affiliateLinks, footnotes and support (see tube-manager.schema.json)
  5. Add thumbnail to thumbnail directory (see sample and tube-manager publish --help)
  6. Publish video to YouTube using tube-manager publish <id>

How to use Visual Studio Code to edit config and dataset

Editing config and dataset using Visual Studio Code makes things much more efficient thanks to IntelliSense.

Step 1: download and install Visual Studio Code

Step 2: enable code command

Click “View”, then “Command Palette...”, type “install code”, select “Install 'code' command in PATH” and press enter.

Step 3: download and install Prettier extension

Step 4: add JSON schemas to user settings

Click “View”, then “Command Palette...”, type “settings json”, select and press enter.

"json.schemas": [
  {
    "fileMatch": [
      ".tube-manager/config.json"
    ],
    "url": "https://raw.githubusercontent.com/sunknudsen/tube-manager/master/schemas/config.schema.json"
  },
  {
    "fileMatch": [
      "tube-manager.json"
    ],
    "url": "https://raw.githubusercontent.com/sunknudsen/tube-manager/master/schemas/tube-manager.schema.json"
  }
]

Step 5: edit config or dataset using code ~/.tube-manager/config.json and code /path/to/tube-manager.json

Contributors

Sun Knudsen

Licence

MIT