Giter VIP home page Giter VIP logo

newsfrwdr's Introduction

newsfrwdr

Checks inputs for new entries and forwards them to outputs (based on name/tag). For now, the only inputs it supports are rss feeds.

Inspired by: rss-forwarder

Supported outputs

  • custom command
  • discord webhook
  • discord bot
  • slack webhook
  • telegram bot

Usage

Docker

  • docker run -d -v "/path/to/config.toml:/config/config.toml" ghcr.io/rdk31/newsfrwdr:master

Command line

Usage: newsfrwdr [OPTIONS]

Optional arguments:
  -h, --help           print help message
  -c, --config CONFIG  alternative path to config.toml

Configuration

Example configuration:

[inputs.rust-blog]
url = "https://blog.rust-lang.org/feed.xml"

[inputs.github-blog]
url = "https://github.blog/all.atom"
tags = ["it"]

[[outputs.default]]   # default output
type = "discord_webhook"
url = "https://discord.com/api/webhooks/abcd..."

[[outputs.rust-blog]] # name output
type = "discord_bot"
token = "token"
user_id = 123456789

[[outputs.it]]        # tag output
type = "discord_webhook"
url = "https://discord.com/api/webhooks/ijkl..."

[[outputs.it]]        # forward the same tag to another channel
type = "custom"
command = "notify-send"

[[outputs.github-blog]]
type = "slack"
url = "https://hooks.slack.com/services/..."

Inputs

Field Type Required Default Description
key string yes - input name
url string yes - url to the feed
interval string no "30m" feed refresh interval
retry_limit int no 10 feed fetch retry limit
tags [string] no ["default"] array of tags

Outputs

discord_webhook type

Field Type Required Default Description
key string yes - input name or tag to forward
type string yes - output type
url string yes - discord webhook url

discord_bot type

Field Type Required Default Description
key string yes - input name or tag to forward
type string yes - output type
token string yes - discord bot token
user_id u64 yes - user id to push entries to

slack type

Field Type Required Default Description
key string yes - input name or tag to forward
type string yes - output type
url string yes - slack webhook url

custom type

Serializes entries to this json structure:

{
  "title": "title",
  "description": "description",
  "author": "null or string",
  "url": "url",
  "timestamp": "ISO 8601 string"
}
Field Type Required Default Description
key string yes - input name or tag to forward
type string yes - output type
command string yes - command to run
arguments [string] no [] command arguments
use_stdin bool no false - false - add the message to the arguments array
- true - push the message to stdin

newsfrwdr's People

Contributors

dependabot[bot] avatar rdk31 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

newsfrwdr's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.