All Projects → fent → Node Feedsub

fent / Node Feedsub

Licence: mit
Subscribes to RSS/Atom/JSON feeds and notifies on new items.

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Node Feedsub

Brief
RSS reader extension for Firefox
Stars: ✭ 184 (+8.24%)
Mutual labels:  feed-reader, rss, atom
Pluto
pluto gems - planet feed reader and (static) website generator - auto-build web pages from published web feeds
Stars: ✭ 174 (+2.35%)
Mutual labels:  feed-reader, rss, atom
Feedreader
C# RSS and ATOM Feed reader library. Supports RSS 0.91, 0.92, 1.0, 2.0 and ATOM. Tested with multiple languages and feeds.
Stars: ✭ 180 (+5.88%)
Mutual labels:  feed-reader, rss, atom
JARR
JARR is a web news aggregator.
Stars: ✭ 99 (-41.76%)
Mutual labels:  atom, rss, feed-reader
FeedReader
C# RSS and ATOM Feed reader library. Supports RSS 0.91, 0.92, 1.0, 2.0 and ATOM. Tested with multiple languages and feeds.
Stars: ✭ 221 (+30%)
Mutual labels:  atom, rss, feed-reader
buran
Bidirectional, data-driven RSS/Atom feed consumer, producer and feeds aggregator
Stars: ✭ 27 (-84.12%)
Mutual labels:  atom, rss, feed-reader
webfeed
A dart package for parsing RSS & Atom feed
Stars: ✭ 92 (-45.88%)
Mutual labels:  atom, rss, feed-reader
Feedme.js
RSS/Atom/JSON feed parser
Stars: ✭ 132 (-22.35%)
Mutual labels:  feed-reader, rss, atom
Miniflux Legacy
Minimalist RSS reader (version 1.x)
Stars: ✭ 897 (+427.65%)
Mutual labels:  rss, atom
Feeds2imap.clj
Pull RSS/Atom feeds to your IMAP folders with Clojure on JVM.
Stars: ✭ 31 (-81.76%)
Mutual labels:  rss, atom
Feedparser
feedparser gem - (universal) web feed parser and normalizer (XML w/ Atom or RSS, JSON Feed, HTML w/ Microformats e.g. h-entry/h-feed or Feed.HTML, Feed.TXT w/ YAML, JSON or INI & Markdown, etc.)
Stars: ✭ 156 (-8.24%)
Mutual labels:  rss, atom
Feedkit
An RSS, Atom and JSON Feed parser written in Swift
Stars: ✭ 895 (+426.47%)
Mutual labels:  rss, atom
Newsbeuter
Newsbeuter is an open-source RSS/Atom feed reader for text terminals.
Stars: ✭ 783 (+360.59%)
Mutual labels:  feed-reader, rss
Posidonlauncher
a one-page homescreen with a news feed
Stars: ✭ 163 (-4.12%)
Mutual labels:  rss, atom
Feedreader
Modern desktop application designed to complement existing web-based RSS accounts.
Stars: ✭ 765 (+350%)
Mutual labels:  feed-reader, rss
Discord feedbot
Moved to https://gitlab.com/ffreiheit/discord_feedbot
Stars: ✭ 67 (-60.59%)
Mutual labels:  rss, atom
Feedparser
Parse feeds in Python
Stars: ✭ 1,200 (+605.88%)
Mutual labels:  rss, atom
Newsblur
NewsBlur is a personal news reader that brings people together to talk about the world. A new sound of an old instrument.
Stars: ✭ 5,862 (+3348.24%)
Mutual labels:  feed-reader, rss
Atoma
Atom, RSS and JSON feed parser for Python 3
Stars: ✭ 67 (-60.59%)
Mutual labels:  rss, atom
Leed
Leed (contraction de Light Feed) est un agrégateur RSS libre et minimaliste qui permet la consultation de flux RSS de manière rapide et non intrusive.
Stars: ✭ 160 (-5.88%)
Mutual labels:  rss, atom

FeedSub

FeedSub subscribes to a remote RSS/Atom/JSON feed and notifies you of any new items it reads.

It works by checking the feed every once in a while, comparing the date of the document via a conditional GET if supported. Otherwise it looks for a date tag in the feed. If it's the same as the last date, it stops downloading it and parsing the xml/json. If it's an updated document, then it looks through it top to bottom taking note of all the new items. Once it finds something it has already read, it stops downloading and parsing the document.

Depfu codecov

Usage

const FeedSub = require('feedsub');

let reader = new FeedSub('http://rss.cnn.com/rss/cnn_latest.rss', {
  interval: 10 // Check feed every 10 minutes.
});

reader.on('item', (item) => {
  console.log('Got item!');
  console.dir(item);
});

reader.start();

API

new FeedSub(feed, [options])

Creates a new instance of FeedSub. options defaults to.

{
  // Number of minutes to wait between checking the feed for new items.
  interval: 10,

  // Some feeds contain a `ttl` tag that specify the
  // number of minutes to cache the feed.
  // Setting this to true will ignore that.
  forceInterval: false,

  // If true, calls `reader.start()` when initialized.
  autoStart: false, 

  // Emits items on the very first request.
  // After which, it should consider those items read.
  emitOnStart: false,

  // Keeps track of last date of the feed.
  lastDate: null,

  // Maximum size of `history` array.
  maxHistory: 10,

  // Some feeds have a `skipHours` tag with a list of
  // hours in which the feed should not be read.
  // if this is set to true and the feed has that tag, it obeys that rule
  skipHours: false,

  // If you'd like to specify exactly what hours to skip.
  hoursToSkip: [],

  // Same as `skipHours`, but with days.
  skipDays: false,

  // Specify exactly what days to skip, ex: ['Saturday', 'Sunday'].
  daysToSkip: [],

  // Options object passed to [miniget](https://github.com/fent/node-miniget).
  requestOpts: {}
}

FeedSub#read([callback(err, items)])

Reads the feed. Calls callback with possible error or new items discovered if provided. Causes reader to emit new item events.

FeedSub#start(readOnStart)

Starts checking the feed for any new items every options.interval minutes. If readOnStart is true, it checks right away.

FeedSub#options

Options that were passed to the constructor along with any defaults are kept here.

FeedSub#stop()

Stops the reader from automatically reading the feed.

Event: item

  • Object - Item.

Emitted whenever there is a new item.

Event: items

  • Array.<Object> - List of items.

Emits all new items from one request in one array.

Event: error

  • Error

Emitted when there is an error downloading or parsing the feed. Not emitted if callback is given for read or readInterval.

Install

npm install feedsub

Tests

Tests are written with mocha

npm test
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].