Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

nzb-cleanup

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nzb-cleanup

Clean up NZB file names

latest
Source
npmnpm
Version
1.4.0
Version published
Maintainers
1
Created
Source

NZB file name cleanup

Library and CLI tool to help clean up NZB file names.

Installation

# library only
$ npm i nzb-cleanup

# cli tool
$ npm i nzb-cleanup -g

Library

The library exports a single function that will take an NZB file name, and return a cleaned up version of it:

const cleanup = require('nzb-cleanup');
let NZBNAME   = '[Gr0uP] my tv show season 3 episode 8 awesome title HDTV H.264.nzb';

console.log( cleanup(NZBNAME) );
// → My.Tv.Show.S03E08.Awesome.Title.HDTV.x264-Gr0uP.nzb

The function takes an optional numerical argument to specify a score threshold, below which the original file name will be returned (to prevent mis-parsing particularly badly formatted file names). The default threshold is 100 (a typical successful parse yields a score of about 300 or higher).

CLI

The CLI tool accepts one or more NZB file names to clean up, and optionally an option to set the threshold (see Library):

$ nzb-cleanup [-t threshold] NZBNAME [NZBNAME ...]

Thanks

Thanks to @skerit for their awesome epinfer module!

FAQs

Package last updated on 14 Jan 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts