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

subs-cli

v1.0.13

Published

A full featured, easy to use, CLI app to download subtitles from opensubtitles.org

Downloads

28

Readme

Subtitles CLI

A full featured, easy to use, CLI app to download subtitles from opensubtitles.org.

Features

  • 🎞 Download subtitles for a movie file or an entire folder of video files
  • ⌨️ Login with your opensubtitles.org account
  • 🏝 Stores preferences for language and opensubtitles.org account
  • ⚔️ Secure! Your account credentials are stored encrypted by your operating system using Keychain/Credential Vault/Secret Service API
  • ⌛️ Shows download quota from opensubtitles.org

Install

npm install -g subs-cli

If you encounter EACCES error on Mac OS read Installation Problems section.

Usage

Download subtitles for all the video files in a directory
subs /path/to/dir
Download subtitles for a single video file
subs /path/to/file.mkv
Help
subs -h

Usage: subs <path> [options]

Options:
  -V, --version       output the version number
  -l, --lang <value>  the language of the subtitles (eng/en, fr/fre, ro/rum,
                      ...) (default: eng)
  -o, --overwrite     overwrite existing subtitles (default: false)
  -p, --path          path of file or dir of files to download subtitles for
  -s, --save-lang     save the current language as default
  -h, --help          display help for command
Save language

If a language is specified with --lang option, using --save-lang flag will save it as the default language

Overwrite

Using --overwrite flag will download and overwrite existing subtitles. Default behaviour is to ignore videos that already have subtitles.

Installation problems

Mac OS

For MacOS npm installs global packages into /usr/local/lib/node_modules. You might need to run the install with sudo.

sudo npm install -g subs-cli

That might cause another problem, as npm drops the sudo privileges for packages that run scripts, and sets the user to "nobody". This will cause keytar (the package that manages the secure storage of account passwords) to not be able to install it's prebuilt native modules, as it cannot create a folder for them.

The only workarounds are to either change the ownership of node_modules dir, and install npm global packages without sudo

sudo chown -R yourusername:admin /usr/local/lib/node_modules
npm install -g subs-cli

or run the npm install command with --unsafe-perm

sudo npm install -g --unsafe-perm subs-cli

I am actively looking for a better workaround. More info here.

License

The code in this project is licensed under the MIT License. See LICENSE for details.