rssc provides a real-time, self-hostable regex-oriented customization service for atom, rss and json feeds.
rssc uses get request parameters to read user’s preferences. following are the supported parameters:
src
: the source URL of the feeds. Example: https://hnrss.org/newestt
: the type of desired feeds (that rssc will return), can berss
,atom
orjson
.descriptionf
: regular expression filter to filter feeds based on the description property.titlef
: regular expression filter to filter feeds based on the title property.contentf
: regular expression filter to filter feeds based on the content property.linkf
: regular expression filter to filter feeds based on the link property.net
: boolean (1 or 0) (default to 0 when omitted) whether to use the .NET engine regex instead of Go’s.
All regex should be valid RE2 regex syntax (in case of net
, see MS’ Regular Expression Language).
Replace https://rssc.fly.dev/ in the following examples with your instance of
rssc (can be a localhost:8080
if self-hosted).
-
Get all new feeds that contain the word “emacs” but not the word “vim”, and not posted by user lr0 (hnrss.org does not provide a creator/author property, so the author filter here is only for a demonstration purpose.):
Do note that
net
is used here because RE2 does not support lookarounds. -
Get geopolitical updates from your favorite hacker and skip all free software movement blessed propaganda:
-
Get BBC middle east updates, only ones that are related to Palestine:
To host rssc locally, install it using Go:
go install github.com/larrasket/rssc@latest
Set environment variable for PORT
, if user doesn’t set a PORT
value, rssc will use :8080
by default.
PORT=4040 rssc
Now rssc should be running at localhost:4040
. You can use the same examples
provided, with replacing fly domain with your localhost.
- RE2 is much safer than the .NET Regex, that’s to say, all the good features
that .NET engine enables you to use come with a risk cost and ends up
enabling catastrophic backtracking, therefore a timeout of 5 seconds is currently
enabled on the fly.dev instance when using
net=1
. - rssc is pre-alpha. Please report bugs here (url)