halbgut / rss-o-bot

A FOSS RSS Bot alternative
9 stars 4 forks source link

alt text

RSS-o-Bot 1.0.0-rc.25

Coverage Status Build Status Dependency Status

A super simple command-line RSS and Atom reader/client. It's not made to read Feeds (like Newsbeuter), but to notify you when new items are posted. The Web is supposed to be decentralized. Most readers (like RSS Bot) are built through centralized services. RSS-o-Bot is not. It's build to be run on your own machine. Notifications are managed by services that are installed separately. Notification services are available for email, desktop notifications and Telegram.

Requirements

Compatibility

RSS-o-Bot should run on all platforms where Node.js runs. But it's developed on Mac OS and the tests are run on Linux. The goal is that it also runs on Windows. Sadly I don't regularly have a machine to test it on. Running RSS-o-Bot itself on different platforms is pretty unproblematic for the most part. What's not as easy though, is running the different notifiers. Especially the desktop notifier. So please check its docs for more information on compatibility.

Name

The name RSS-o-Bot is a play on RSS Bot. The o stands for open as in FOSS.

Documentation

Refer to the man-page on Github or man rss-o-bot (if you have installed it).

Installation

npm i -g rss-o-bot
npm i -g rss-o-bot-email # A notifier

Your RSS-o-Bot, will search for a configuration file here: ~/.rss-o-bot/config.json. Here's an example configuration:

{
  "notification-methods": ["desktop", "telegram", "email"],
  "email-recipients": ["someone@somewhereinthe.net"],
  "telegram-api-token": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "telegram-recipients": ["00000000"]
}

By default rss-o-bot stores its data inside a SQLite database in ~/.rss-o-bot/feeds.sqlite. But you may configure it as you want (see man-page).

After creating the configuration file you can validate it using rss-o-bot test-config.

Usage

First, let's add a feed:

$ rss-o-bot add https://github.com/kriegslustig/rss-o-bot/commits/master.atom

When we now list all feeds, the one we added, is displayed.

$ rss-o-bot list
1: null - https://github.com/kriegslustig/rss-o-bot/commits/master.atom -

The first column in the output of rss-o-bot list is the feeds IDs. The second shows the title. It's null right now, because

$ rss-o-bot rm 1

Now we can add the URL again, now with a filter:

$ rss-o-bot add https://github.com/kriegslustig/rss-o-bot/commits/master.atom "notif"

So now we get notified, whenever a commit message contains the string "notif". There are some more options available when adding filtered feeds. Refer to the man-page for more information.

Available Notifiers

Daemonizing

To run RSS-o-Bot, you'll want to daemonize (make it run in the background) it. Daemonizing it brings some problems with it though. The daemonized process can't send desktop notifications. If you're using Linux you'll probably want to go with systemd. Figure it out yourself. If not, you probably want to use pm2. It provides a really powerful, yet simple to use system for process-daemonization (LOL).

npm i -g pm2
pm2 start rss-o-bot

If you haven't yet, I'd make pm2 services start upon reboot.

pm2 startup [platform] # Refer to `pm2 -h` for available platforms

Development

Before committing, use npm run build to build the man page and the JS.

Developing Notifiers

RSS-o-Bot requires a module for each "notification-methods" in the pattern rss-o-bot-${method}. You may develop your own notifier by creating a package and naming it rss-o-bot-${method-name}. That package's main should export a single function that is called by rss-o-bot in the following manner:

notifier(configuration)(blogTitle, entryUrl, entryTitle)

You may want to check the rss-o-bot-email source code for further reference.

Trouble Shooting

Error: Please install sqlite3 package manually

This error sometimes occures when sqlite3 couldn't be installed properly. To solve this do the following:

cd $(npm config get prefix)/lib/node_modules/rss-o-bot/node_modules/sqlite3
npm i --build-from-source

Now you should be able to run rss-o-bot.

Credits

Logo created by mala23

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

TODO