Filed under GUI | Internet | Setup & Config | GPL v3 | Scripts | Meta

RSS Guard feed filtering: Easier skimming, better overview

For your news feeds, we recommend RSS Guard as our application of choice. Besides all features that you’d expect from any feed reader, it offers several helpful features:

  • You can use it stand-alone, or as a client to feed aggregators on the web, like Nextcloud News (open source); or Feedly, Inoreader, all servers with a Google Reader API (commercial)
  • You mix and match any of these options, including multiple account setups
  • Its user interface supports 20+ languages
  • Its filtering system is powerful (see examples below), supporting regular expressions and JavaScript
  • It supports niche features, like scraping websites with scripts and turning them into a news feed

After installing RS Guard, please subscribe to a few feeds so you can play with the examples shown below. We do not recommend that you do your first experiments while RSS Guard is subscribed to your web-based feed aggregator. Give yourself time to try out things with a few local feed subscriptions.

When you have configured RSS Guard to retrieve news items from an account with a web-based news feed aggregator, any local modifications to news items usually don’t propagate to the server side – except for importance markers (aka stars, favorites, …), if supported.

Automatically mark news items as important (star, favorite, …), add length indicator

Let RSS Guard »read« every feed item, mark important ones, and add a length indicator to it’s title.

The filter will modify news item titles like this:

Screenshot of RSS Guard sample news item list, with length indicators and content tags enclosed in square brackets and added to the title
RSS Guard displaying sample content tags and length indicators

To help you get started, we’re providing a filter template. Just replace the sample search patterns with your own, and keep the rest unchanged.

  1. Start RSS Guard, select Articles > Article filters from its menu, and click +New filter.
  2. Set the Name of the filter to anything you like
  3. Delete everything from the field JavaScript code, and paste in the sample importance filter.
  4. Try changing the sample search expressions to something that’s more interesting to you
  5. Check off all news feeds that you want to be processed by this filter

The filter will be applied, automatically, whenever the feed reader retrieves new items. Optionally, press Process checked feeds, to have it applied to all news items that have already been retrieved.

Controversial: add emojis to titles, for faster title skimming

Let RSS Guard »read« every feed item, and add a visual cue to its title if it might be interesting.

The filter will modify news item titles like this:

Screenshot of RSS Guard sample news item list, with content-related emojis added to the titles
RSS Guard displaying sample, content-related emojis

At first, this may look repulsive. However, consider this:

  • Imagine skimming a »world news« feed that is flooding you with hundreds of news items per day; you’re potentially interested in news about, e.g., 🇸🇪 Sweden. Would you want have all related news items marked as »important«? Probably not. Rather, you’d skim the titles. It’s arguably faster and easier to look for the flag of Sweden than for the word »Sweden«.
  • You could start with a few selected emojis only. Their use for the purpose discussed here is an acquired taste.

To help you get started, we’re providing a filter template for this, too. Just replace the sample search expressions with your own, and keep the rest unchanged.

All news items are passed through all filters, so if you’ve defined an importance filter (see above), too, news item titles will have both length markers and emojis added, where appropriate.

Simple keyword decorations

Create another filter as described above, but this time paste in the sample title modification filter.

Example: Replace »Italy« by »🇮🇹Italy«.

Read how the sample filter does that.

Decorating Acronyms

Example: Replace »EU« (European Union) with »🇪🇺EU«, but don’t match things like »EUROPE«, »EUR«, »eu«, »FLEUR«, …

How: An acronym is either preceded by anything that isn’t a letter, or at a line start; it is followed either by anything that isn’t a letter, or the end of the line.

msg.title = msg.title.replace(
      /(^|[^a-zäöüßA-ZÄÖÜ])(EU)([^a-zäöüßA-ZÄÖÜ]|$)/, '$1🇪🇺$2$3');

Important parts:

  • Do not match if any letter of a-zäöüßA-ZÄÖÜ comes directly before or after »EU« (e.g., neither »FEUD« nor »EUROPE« will be matched). Note that also German umlauts are included here: If some of your news feeds aren’t English, you may need to add language-specific characters.
  • Start of line ^ is ok before »EU«, and end of line $ is ok after it.

Words, plus Compounds that end in that word

Example: Prefix all words that end with »room« with a 🚪door emoji. Match words like »room«, »bedroom« or »darkroom«, but not »roommate«.

msg.title = msg.title.replace(
      '🚪' +

Important parts:

  • If there is any sequence of a-z in front of »room«, consider the word a compound and match it, as a whole. This will be character group 1, hence referred to as $1
  • Make sure anything directly after »room« is a line end $, or not a letter [^a-z]. That character will be group number 3, hence referred to by $3.
  • Ignore case, when trying to match: /i
  • Don’t put the door emoji directly in front of »door«, but in front of the whole compound: '🚪' + '$1$2$3'
Since room is an English word, we don’t have special, language-specific characters to match in front of it, or to avoid at the end of it.

Minor spelling variants

Some terms are spelling variants, or look quite similar (even across languages) and can be matched by a single expression.

Example: Match both »labour« and »labor«, but not »laboratory«:

msg.title = msg.title.replace(
      '🔧' +

Important parts:

  • Adding [u]? means that the character u is optional: it occurs once, or not at all.
  • Make sure anything directly after »labour«/»labor« is a line end $, or not a letter [^a-z].
  • Do not ignore case: the expression ends with /, not with /i. This will avoid matching »Labour«, as in »Labour party«.

Multi-language term matching

Your news feed might be multi-lingual.

Example: You speak English, French, and German; and you’re interested in everything related to the continent of Africa.

So, lets create a filter that will match accordingly, and add the 🌍 globe emoji showing Africa as a prefix to whatever is found. We’ll need to match nouns and adjectives in three languages.

We need to prefix Nouns »Africa« (EN) / »Afrique« (FR) / »Afrika« (DE) with the emoji displaying Africa. Also, all adjectives that begin with »african« (EN) / »afriquain« (FR) / »afrikanisch« (DE). Additionally, German allows for compounds like »Westafrika« (for »West Africa«):

msg.title = msg.title.replace(/([a-zäöüß]*Afri[ckq])/i, '🌍$1');

Similar for the Americas:

msg.title = msg.title.replace(/([a-zäöüß]*Ameri[ckq])/i, '🌎$1');

Similar for Asia:

msg.title = msg.title.replace(/([a-zäöüß]*Asi[ae])/i, '🌏$1');

Important parts:

  • If there is any sequence of a-zäöüß in front, consider the word a compound and match it, as a whole. Note the round brackets () enclose the whole expression here so any match will be considered to be character group 1, and hence be referred to as $1.
  • Exactly one of ckq must be present.
  • It seems safe to ignore the rest of the word when trying to match, because all words that begin like that seem related to what we are interested in.

Cleanup, during experiments: Removing all emojis from titles

During your experiments, you might wish to remove all emojis that your filters have added so far.

You can create a »cleanup filter«, temporarily select all of your feeds, and manually run it by pressing Process checked feeds.

Don’t forget to deselect all feeds afterwards, else the cleanup filter will be applied every time RSS Guard retrieves news updates.
Please note that the complete set of emojis is somewhat of a moving target: new ones get introduced almost every year, so the code presented here might leave behind a few new emojis, in the future.
msg.title = msg.title.replace(

Image Credits:
Papirus icon for RSS Guard (modified) | GNU General Public License, version 3

This content is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
For your attributions to us please use the word »tuxwise«, and the link