• Stars
    star
    428
  • Rank 101,481 (Top 2 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 9 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A river-of-news RSS aggregator in JS running in Node.

River5

River5 is a river-of-news RSS aggregator in JavaScript running in Node, written by Dave Winer.

How River5 works

When it starts up, River5 reads files in the lists folder at the top level of the River5 folder.

Each list contains a set of URLs of feeds. The list files can be straight text, a JSON array of URLs of feeds, or a traditional OPML subscription list, with extensions .txt, .json and .opml. River5 ignores files in the lists folder that are not in one of these formats.

The feeds pointed to from the lists can be in RSS 0.9x, 1.0 or 2.0, or Atom 1.0.

Every 15 minutes, River5 reads all the feeds you're subscribed to, and routes new items to corresponding files in the rivers folder at the top level of the River5 folder. You're subscribed to a feed if it appears in one or more of your lists. The river files are a documented form of JSONP that we've been using since River3, in 2010.

To read the output of River5 on the machine it's running on, go to the home page. Assuming your river is running on the default port, 1337, you would go to this address to read the rivers. http://localhost:1337/. If it's running on a public server, just replace localhost with the domain name or IP address of the server.

Pretty much everything in this narrative is configurable.

Requirements

A current Node.js installation.

The machine running River5 ahould able to access the Internet.

It is possible to run the software on a non-public machine. Of course, you won't be able to access the home page remotely, or receive realtime notifications of feed updates. You'll also have to find a way to upload the output files in the rivers folder to a place where they can be accessed, if you want others to be able to access your river.

If you don't have Node.js installed on your machine, here are step by step instructions for installing Node.js on a Macintosh.

How to install

  1. Download the folder from the repository to your local computer.

  2. From the command line, go to this folder.

  3. npm install

  4. node river5.js

If it's working properly, you should see tons of stories scroll by in the console. River5 is reading each of the feeds in the lists for the first time. When you see things settle down, then you should open the home page of the RIver5 website, at http://localhost:1337/ and see the result of the first feed readings.

At first there will be a lot of old stories, but as the rivers run for hours and days and into weeks, you'll get the flow. It's a good way to read news.

Examples of lists

I have included several files in the lists folder to help you get started, so something actually happens the first time you run River5. You can edit, consolidate or delete them, as you wish.

  1. myJsonFeeds.json -- a list of URLs of feeds in the JSON format that River5 understands.

  2. myOpmlFeeds.opml -- a list of URLs of feeds in the standard OPML format for subscription lists.

  3. myTxtFeeds.txt -- a list of URLS in a text file.

  4. nyt.opml -- a list of a New York Times news feeds.

  5. hn.opml -- a list with just one feed in it, the Hacker News firehose. It's a good list for testing RIver5 because it updates so frequently.

To view your rivers

Go to http://localhost:1337/.

Configuring

There's only one way to configure it, via the config.json file in the same folder as the river5.js app.

The example config.json in the folder sets the max number of items in a river to 300.

All of the config.json options and their default values are listed on this page.

For River4 users

River5 does not support S3 storage, so if that's how you're running your rivers, you should continue to use River4.

  1. If you're running out of the filesystem, then River5 can replace River4.

  2. Follow the installation instructions above, and before you launch river5.js, remove the files from the lists folder, and replace them with the lists from your River4 installation.

  3. It will take a while before your rivers re-populate, so I recommend doing it in parallel with your existing River4 install.

You may want to review the Configuration settings page, there are options for setting new things, and in some cases the defaults have changed.

Where's the code?

The heart of River5 is in a Node package in the lib folder, called davereader.

To upgrade to the latest version of the software npm update at the command line in the river5 folder.

river5.js itsef is a very small file and by design almost never changes.

Examples of working rivers

  1. Podcatch.com subscribes to my friends' podcast feeds.

  2. mlbriver.com and nbariver.com collect news for two sports I love.

  3. I have a River panel on the Scripting News home page.

  4. My rivers page puts all the news I care about on a single tabbed page, with panels for the NYT, Washington Post, Guardian, Movies, Tech, baseball and basketball.

Other docs

  1. The road to River5, reviews the previous versions of my river-of-news software going back to 1999, with a special focus on the transition from River4 to River5.

  2. The Hello World of Rivers shows you how to create a standalone river, one that people can read without accessing your RIver5 server.

  3. My blog post announcing River5.

Updates

v0.50 -- 5/18/17 by DW

Major release of River5, but in a way not much changed.

The lib folder is gone. The two items that were in the folder have been published using NPM, the official Node.js software distribution system. This means that they can be used in projects other than River5.

river5.js has been changed to use the new version of feedtools, called davereader (the name feedtools was already taken). It should work exactly as before.

This change will make new feed-based software possible. I've written about that on the reader site, and in a blog post.

Otherwise the changes should be totally transparent to River5 users. The software should behave exactly as it did before. Not much actually changed, it's just been reorganized to make it more useful in more situations.

Future updates will be logged in the Updates section of the reader site.

To update to the new version, follow the same instructions as for previous releases.

v0.49 -- 4/18/17 by DW

Support for podcasting. New config values, described on the config docs page.

Added buildRiver callbacks.

v0.48 -- 3/29/17 by DW

Changes for Electric River. Added three new callbacks to config that allow us to do things a bit more efficiently because the reading and configuring app is running in the same process as the server. Wrote a howto doc for people with experience running River5. Added flBuildEveryFiveSeconds to config, if true, we build changed rivers every five seconds instead of once a minute, the default. Building rivers became a lot more efficient in the change from River4 so it made sense to allow them to be rebuilt more frequently.

v0.47 -- 2/9/17 by DW

Fixed two problems reported by Andrew Shell. Added some feeds to the default set up, and configured the default home page so it only has three panels and they have intelligent labels, using the relatively new homePage configuration option. Fixed a problem with NYT feeds and cookies. We now set the User-Agent header on requests. Apparently some servers won't respond unless this header is present.

v0.46 -- 11/16/16 by DW

Refreshed the admin app, relocated it, and fixed a couple of entry-points it depends on that didn't work with CORS.

v0.45 -- 3/14/16 by DW

Fixed a bug that prevented addToRiver callbacks from working correctly. When you made a change to an item in a river it wasn't actually being reflected back in the river.

As a result of this fix, River4 callbacks should now work in River5.

v0.44 -- 2/22/16 by DW

Fixed a bug that prevented text file lists from working. It would only subscribe to the last feed in the list.

v0.43 -- 2/4/16 by DW

You can now configure the panels on the server's home page.

The new configuration feature is documented in a new section on the configuration page.

v0.42 -- 2/4/16 by DW

We accept two new formats for files in the lists folder -- straight text and JSON, in addition to the traditional OPML subscription lists.

If a file in the lists folder has a .txt extension, we assume it's just a series of lines with the URLs of feeds. It's the simplest of all the list formats.

If it has a .json format, we look for a JSON file that's just an array of URLs.

Created a new top-level lists folder containing example lists in each of the three supported formats.

v0.41 -- 2/3/16 by DW

We now maintain a new data structure for each list, riverData.json, in the same folder as the listInfo.json file.

It contains an array of river items that are part of this river. To build the riverjs file, all we have to do is loop over that array.

It's kept in memory while River5 is running, so now building a river on reads a file from the disk the first time a river is built or an item is added to it.

One of the first bennies of rebuilding the river software, it's now quite a bit faster at building rivers, and it's no longer a function of how dense the river is. In previous versions, rivers that don't update often would require us to go back a long ways into the calendar structure to build the river.

Now the calendar structure is just an archive, it's no longer used to build anything. It could be made optional.

Questions, comments?

Please post a note on the River5 mail list.

More Repositories

1

concord

Core outliner
JavaScript
440
star
2

river4

A JavaScript river-of-news aggregator running in Node.js
JavaScript
265
star
3

nodeRunner

nodeRunner is a JavaScript app that runs scripts every second, minute, hour or day, each group in its own folder.
JavaScript
185
star
4

1999-project

Docs, support and sample code for the 1999 server and app project.
JavaScript
158
star
5

myWordEditor

A simple silo-free blogging tool that creates beautiful essay pages.
JavaScript
156
star
6

pagePark

I wrote this simple Node.js folder-based HTTP server that serves static and dynamic pages for domains I've bought but not yet used. Then I kept going...
JavaScript
136
star
7

Scripting-News

I'm starting to use GitHub for work on my blog. Why not? It's got good communication and collaboration tools. Why not hook it up to a blog?
HTML
112
star
8

nodeStorage

A simple storage system based on Twitter identity implemented in Node.js.
JavaScript
103
star
9

tweetsToRss

A node.js app that periodically reads a Twitter account and generates an RSS feed from it.
JavaScript
86
star
10

reallysimple

A Node package that reads RSS, Atom and RDF feeds and calls back with a simple, consistent JavaScript object.
JavaScript
84
star
11

fargoPublisher

Fargo Publisher is a node.js app that connects to Fargo to publish a folder of HTML docs.
JavaScript
71
star
12

xml-rpc

XML-RPC client and server in JavaScript.
JavaScript
61
star
13

myWord

An easy open source way to create nice-looking web pages for essays.
HTML
58
star
14

feedRead

Read a feed and call back with a JavaScript object.
JavaScript
56
star
15

feedsForJournalists

An open source project to create a great list of feeds for journalists to follow.
45
star
16

artDownloader

A collection of great art in a folder. Download and point your screen saver at the folder for a live art show.
JavaScript
38
star
17

frontier

C
38
star
18

outlineBrowser

JavaScript code to display JSON outlines.
JavaScript
37
star
19

publicfolder

A Node app that runs on your desktop and keeps an S3 location in sync with a folder on a local disk.
JavaScript
34
star
20

feedBase

A project to get feeds into a base.
JavaScript
33
star
21

opmlPackage

Node and browser-based code that helps developers support OPML in outliners, feed readers and renderers.
JavaScript
29
star
22

rssToSlack

A JavaScript app that reads a set of feeds and posts the new items to a Slack channel. Runs in Node.js.
JavaScript
27
star
23

feedToMasto

Node app that checks a list of feeds periodically, post new items to Mastodon.
JavaScript
26
star
24

trex

OPML and JavaScript-based content management
C
25
star
25

riverBrowser

A JavaScript toolkit that displays a river of news
JavaScript
25
star
26

reader

JavaScript package for feed reading and aggregating.
JavaScript
22
star
27

utils.js

A library of JavaScript utility routines that are patterned after Frontier verbs
JavaScript
22
star
28

drummerSupport

Support for Drummer users.
19
star
29

listicle

A new version of the software used in the Cluetrain listicle
19
star
30

fargoTemplates

The templates for the core types in Fargo 2. You are free to clone them, modify the result and redistribute.
18
star
31

githubpub

A Node app that serves from GitHub repositories.
JavaScript
18
star
32

betterWebSocketsDemo

WebSockets demo app in JavaScript, both client and server.
HTML
16
star
33

opml.org

A repository to back up the opml.org website.
JavaScript
15
star
34

upstreamer

A Node.js app that keeps a folder backed up on Amazon S3.
JavaScript
15
star
35

feedParserDemo

A demo of Dan MacTough's feedparser package for Node.
JavaScript
15
star
36

interAppComm

Demonstrates a simple way of doing interapplication communication in JavaScript using localStorage.
15
star
37

Icon-Chooser

An icon chooser for Font Awesome icons, running in Bootstrap 2.
15
star
38

feedlandSupport

A place to share and discover feeds.
14
star
39

myLogseqBlog

A cross-platform Node app that publishes a LogSeq journal as a blog via Drummer
JavaScript
14
star
40

macwrite

A simple demo app for nodeStorage.
HTML
13
star
41

Mastodon-API

I'm working on connecting to the Mastodon-API, getting help from friends who have been down this path.
JavaScript
13
star
42

oldSchoolBlog

Blogging in the ways of the old school.
JavaScript
12
star
43

instantOutlines

Sharing outlines between apps using GitHub as an intermediary.
12
star
44

likes

A simple likes server for the web running in Node.
JavaScript
11
star
45

drummerRFC

A place to post RFCs for people who use and develop in Drummer.
11
star
46

electricPork

An Electron app that helps you write and publish threads on Twitter.
JavaScript
11
star
47

titlelessFeedsHowto

A simple feed item viewer that works with titled or titleless items.
11
star
48

rss

JavaScript code to build an RSS feed from a standardized structure.
JavaScript
11
star
49

wpIdentity

Implements OAuth identity with wordpress.com for Node.js apps.
JavaScript
10
star
50

myRoute53

A simple utility that creates a JSON file with a map of your Amazon Route53 names. Runs in Node.js.
JavaScript
10
star
51

wp2opml

10
star
52

feedland

The source code for the NPM feedland package.
JavaScript
10
star
53

opml

A repo in transition
9
star
54

urlShortener

A JavaScript URL shortener running in Node.js.
JavaScript
9
star
55

subscriptionListCleanup

Read an OPML subscription list, and loop over all the feeds and only pass on the ones that are reachable and parseable.
9
star
56

docServer

Browse scripting verbs in a web app.
JavaScript
8
star
57

1999client

A client app for 1999.io, in JavaScript, using WebSockets.
JavaScript
8
star
58

appServer

Factored code that was appearing in all my servers.
JavaScript
7
star
59

ioServer

A server and reader for outlines that update in real time.
JavaScript
7
star
60

utils

All the JavaScript utility routines I use across all my apps, both in the browser and in Node.
JavaScript
7
star
61

oldSchoolNightly

Uploads JSON, OPML, RSS and HTML files from Scripting News to the repository on GitHub, every night at midnight.
JavaScript
7
star
62

s3folder

A Frontier tool that keeps a folder on your hard drive in synch with a location in the S3 hierarchy. Also a demo of using GitHub to manage a Frontier tool, a task previously thought to be impossible! :-)
7
star
63

textcasting

An HTTP server that can post messages to Mastodon, Bluesky, Twitter and WordPress via REST call. A bridge betw web writing tools and various places people want to post their writing to.
JavaScript
6
star
64

tweets.opml.org

A directory of tweets.opml files for people using tweets.opml.org.
6
star
65

feeder

A set of services that do feed reading for Drummer scripts.
6
star
66

opmlToJs

opmlToJs makes it easy to read and write OPML files in Node apps.
JavaScript
6
star
67

english

The server behind the English editor.
JavaScript
6
star
68

superSync

Keep folders in sync with Amazon S3 locations.
6
star
69

xmlViewer

Try to get a browser to view an RSS feed these days. They just won't do it. This app does.
HTML
6
star
70

tweetFeedSupport

Twitter + Markdown βž™ RSS (feed readers)
5
star
71

bookmarkletMaker

A browser-based app that makes bookmarklets easier to make
HTML
5
star
72

blue.feedland

A place to discuss and develop an app that connects social media apps via feeds.
JavaScript
5
star
73

rssSpec

A GitHub repo with the source of the RSS 2.0 spec website at cyber.harvard.edu.
HTML
5
star
74

drummerCms

A shell for Old School to connect it with Drummer. Released so other outliners can hook up to Old School for blogging.
JavaScript
5
star
75

folderToJson

Generates a JavaScript object (or JSON text) that represents the structure of a folder.
JavaScript
4
star
76

mastodon

The beginning of support for Mastodon in DaveLand.
JavaScript
4
star
77

metaweblog

Client and server implementation of the Metaweblog API in JavaScript.
JavaScript
4
star
78

mail

One place to send mail from all my Node apps.
JavaScript
4
star
79

electronLand

My container for Electron apps that use nodeStorage for identity.
JavaScript
4
star
80

worldOutline

The JavaScript port of the World Outline software.
JavaScript
4
star
81

github

Read and write files to a GitHub repository
JavaScript
4
star
82

scripting

Heh I found a way to add stuff to my GitHub profile page. Let's see how this sucker works.
4
star
83

opmlToGitHub

A Node app that reads an OPML file, converts it to Markdown, and uploads it to GitHub.
JavaScript
4
star
84

everyMinute

Runs a JavaScript callback with setInterval, at the top of every minute, with no drift.
JavaScript
4
star
85

http

The heart of a Node-based web server to be included in other apps. I got tired of writing the same code over and over.
JavaScript
4
star
86

kimParker

3
star
87

checkFeedsInOpml

A utility that checks if the feeds in an OPML list are accessible
JavaScript
3
star
88

es6ModulesHelloWorld

A minimal app that uses modules as defined in ES6.
JavaScript
3
star
89

jsPreprocessor

A simple JavaScript pre-processor to help get your project started.
JavaScript
3
star
90

fargocms

The CMS built into Fargo, as a standalone Node.js package
JavaScript
3
star
91

s3BigUpload

Demo app for streamed uploads to S3 in Node/JavaScript.
JavaScript
3
star
92

s3

Routines that simplify the interface to Amazon S3
JavaScript
3
star
93

chat

A simple extensible JavaScript chat network
JavaScript
3
star
94

scripting.github.io

HTML
3
star
95

bookmarksMenu

Client JavaScript code that manages a Bookmarks menu.
JavaScript
3
star
96

opmlCloud

A server and desktop software that emulates Drummer's instant outlining protocol.
JavaScript
3
star
97

aceEditorDemo

I needed good demo code for the Ace editor.
JavaScript
3
star
98

blogroll

A JavaScript toolkit that displays an OPML-based blogroll, with a connection back to FeedLand for realtime features.
JavaScript
3
star
99

persists

Persistence for JavaScript objects in Node.
JavaScript
3
star
100

twitterHelloWorld

How to say Hello World via the Twitter API from browser-based JavaScript.
JavaScript
3
star