Coder Social home page Coder Social logo

inferno-inc / matrix-rss-bot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from william3johnson/matrix-rss-bot

1.0 1.0 1.0 15 KB

A stateless [Matrix] bot which serves RSS feeds into rooms.

License: GNU General Public License v3.0

Python 100.00%

matrix-rss-bot's Introduction

matrix-rss-bot

A stateless* Matrix bot which serves RSS feeds into rooms.

* all persistent state is stored on the Matrix homeserver, i.e. none on disk

Requirements

  • Python 3
  • matrix-python-sdk >= 0.3 (available via pip as matrix-client)
  • [feedparser] >= 5.2 (available via pip)

Usage

./rssbot.py <homeserver-url> <account-id> <token-file> where

  • <homeserver-url> is the URL of your Matrix homeserver, e.g. https://matrix.johni0702.de
  • <account-id> is the full Matrix ID of your bot account, e.g. @jBot2:johni0702.de
  • <token-file> is the path to a file which contains an access token for the bot account

To setup an RSS feed, simply invite the bot into your room. Until this bot is integrated into some Integration Managers, configuration of feeds needs to be done manually: The feeds in a room are configured via a custom state event (de.johni0702.rssbot):

{
  "feeds": [
    {
      "url": "http://lorem-rss.herokuapp.com/feed?unit=day",
      "update_interval_secs": 3600
    },
    {
      "url": "http://lorem-rss.herokuapp.com/feed?unit=minute",
      "update_interval_secs": 10
    }
  ]
}

To send such a state event using the Riot web client:

  • type /devtools in the room you want to configure
  • click on Send Custom Event
  • click on Event in the bottom right (changes to State Event)
  • set Event Type to de.johni0702.rssbot
  • insert the desired configuration (example see above) as the Event Content
  • click on Send

License

matrix-rss-bot is provided under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. See LICENSE for the full license text.

matrix-rss-bot's People

Contributors

johni0702 avatar

Stargazers

Kevin Alexander Scott Jellis avatar

Watchers

 avatar

Forkers

inferno-inc

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.