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

yquem

v1.1.11

Published

Fetches subtitles for tv shows episodes from Beta Series.

Downloads

61

Readme

yquem

A JavaScript library which fetches subtitles for tv shows episodes from Beta Series API.

This library works weel with Medoc.

License: MIT npm version Install size

Features

  • Detect recent episodes (default 2 day old) from a specific directory (filename must be {show} - {season}x{episode}.{format});
  • Download first subtitle found on Beta Series for this episode next to the episode file.

Install

$ npm install yquem

Usage

const Yquem = require("yquem")

const yquem = new Yquem(`d:`)

yquem
  .run()
  .then(results => {
    console.log(results)
  })
  .catch(err => {
    console.error(err)
  })

Documentation

Instance methods

run()

Look for recent files from the specified directory, try to grab subtitles from filename, returns a Promise when done.

Static methods

getRecentFilesFromDirectory([path], [fileAge])

Return a list of recent files from the specified directory.

  • path <string> Directory to scan.
  • fileAge <string> | <number> Number of days to consider a file to be recent.

hasSubtitle([file], { languages: 'en' })

Check if a subtitle file exist next to the episode file specified.

  • file <string> Complete path of a episode file
  • options <object> :
    • languages <string | array> List of languages to look for, default: en

getSubtile([file], { languages: 'en' })

Search a subtitle onn Beta Series and download it next to the episode file specified.

  • file <string> Complete path of a episode file
  • options <object> :
    • languages <string | array> List of languages to look for, default: en

download([url])

Download file from a given url.

  • url <string> URL as a string.

getSubtitles([show])

Get the list of subtitles found on Beta Series for an episode.

  • show <object> :
    • name <string> Name of the show
    • season <string> | <number> Season number
    • episode <string> | <number> Episode number

getShowName([filename])

Extract show name from filename.

  • filename <string> Episode filename, format : Krypton - 1x01.

getShowNumber([filename])

Extract season number and episode number from filename.

  • filename <string> Episode filename, format : Smallville - 6x08.

getShow([name])

Get the show object from Beta Series API.

  • name <string> Show name.

getEpisodeByShow([id], [episode])

Get the episode object from Beta Series API.

  • id <string | number> Show identifier.
  • episode <string> Episode description, format : S01E01.

writeFile([data], [destinationPath])

Write a new file to destinationPath.

  • data <buffer> Date of the new file.
  • destinationPath <string> Complete path of the new file.

buildEpisodeName([name], [season], [episode])

Return the formatted episode name, ie : Final Space - 2x03.

  • name <string> Name of the show
  • season <string> | <number> Season number
  • episode <string> | <number> Episode number