Nitpin
Nitpin is an NNTP (Usenet/Newsgroups) client library written in JavaScript for node.js/io.js.
Install
$ npm install nitpin
Features
- Handles multiple connections
- Reaps idle connections after 30 seconds of inactivity
- Download NZBs & yEnc decoding
- PAR repairs (requires par2 installed on your system)
Todo
- Add support for more commands
- Multi-server support
- ...
Available command methods
- getHead (HEAD)
- getBody (BODY)
- getArticle (ARTICLE)
- stat (STAT)
- over (XZVER/XOVER/OVER)
- group (GROUP)
- capabilities (CAPABILITIES)
- list (LIST ACTIVE [wildmat])
Examples
Create a Nitpin instance
var Nitpin = server = host: 'news.php.net' // Example uses the open PHP newsgroups server user: null // Example doesn't need username pass: null // Nor password port: 119 secure: false connections: 1 // 1 is the default amount of connections ;
Get an overview of messages for the given group
// Automatically tries XZVER, falls back to XOVER when not availableserver;
Get an article
// Get a specific article from a groupserver;
Get an NZB and stream the contents
This is still in development and needs a lot more refining.
// Parse an NZB: supply a path on this computer or a URL to download fromserver;
License
MIT