rssc

command module
v0.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 15, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

README

rssc provides a real-time, self-hostable regex-oriented customization service for atom, rss and json feeds.

Usage

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/newest
  • t: the type of desired feeds (that rssc will return), can be rss, atom or json.
  • 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).

Examples

Replace https://rssc.fly.dev/ in the following examples with your instance of rssc (can be a localhost:8080 if self-hosted).

Self-host

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.

Notes

  • 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)

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL