gruik

Fork of GCU-Squad's RSS-to-IRC bridge
git clone https://git.instinctive.eu/gruik.git
Log | Files | Refs | README | LICENSE

README.md (2838B)


      1 # Gruik, your news source
      2 
      3 _Gruik_ is an _IRC_ bot written in Go that fetches _RSS_ feeds and prints them on a
      4 chosen channel.  
      5 It has no database and focuses on news freshness, it will store a `ringsize` number of news
      6 which rotate as news come in.  
      7 _Gruik_ supports _x-posting_ meaning that it can join other channels than the main one so you
      8 can post curated news using their hash, so the _x-post_ channels only receive a controlled
      9 number of news.
     10 
     11 * `maxnews` is the maximum number of news fetched from an _origin_
     12 * `maxage` is the maximum news age, no news older than this will be fetched
     13 * `frequency` is the refresh frequency
     14 * `ringsize` is the number of news to keep on memory, disk, and rotate on
     15 
     16 ## Configuration
     17 
     18 Here's a sample `config.yaml` file:
     19 
     20 ```yaml
     21 irc:
     22   server: irc.libera.chat
     23   nick: Gruik
     24   channel: "#myfeedz"
     25   xchannels:           # optional, channels where you´d like to xpost
     26     - "#otherchannel"  #
     27   password: piggypiggy # optional
     28   debug: false         # ditto
     29   port: 6667           # ditto
     30   delay: 2s            # ditto, delay between 2 lines to avoid flood
     31   colors:              # ditto
     32     origin: pink       # ditto
     33     news: bold         # ditto
     34     link: lightblue    # ditto
     35     hash: gray         # ditto
     36   ops:                 # ditto
     37     - MrFoo            # ditto
     38     - MrsBar           # ditto
     39 
     40 feeds:
     41   urls:
     42     - https://news.ycombinator.com/rss
     43     - https://rss.slashdot.org/Slashdot/slashdotMain
     44     - https://www.osnews.com/feed/
     45     - https://lwn.net/headlines/rss
     46     - https://www.phoronix.com/rss.php
     47     - https://lobste.rs/rss
     48     - https://undeadly.org/cgi?action=rss
     49     - https://www.freebsd.org/news/feed.xml
     50     - https://feeds.fireside.fm/bsdnow/rss
     51     - https://www.dragonflydigest.com/feed
     52     - https://newsletter.nixers.net/feed.xml
     53     - https://vermaden.wordpress.com/feed/
     54     - https://www.journalduhacker.net/rss
     55     - https://linuxfr.org/news.atom
     56     - https://rss.nytimes.com/services/xml/rss/nyt/World.xml
     57     - https://www.nextinpact.com/rss/news.xml
     58     - https://www.freebsd.org/security/feed.xml
     59     - https://www.discoverbsd.com/feeds/posts/default
     60     - https://netbsd.fi/atom.xml
     61   maxnews: 10   # optional
     62   maxage: 1h    # optional
     63   frequency: 5m # optional
     64   ringsize: 100 # optional, number of news to rotate on
     65 ```
     66 
     67 ## Usage
     68 
     69 ```shell
     70 $ ./Gruik
     71 ```
     72 
     73 ## IRC commands
     74 
     75 For everybody:
     76 
     77 * `!lsfeeds` lists available RSS feeds, can be asked privately
     78 * `!xpost <news hash>` posts news with hash `<news hash>` to `xchannels`
     79 * `!latest <number> [origin]` will post `number` of latest news from optional `origin` in a query message
     80 
     81 For ops:
     82 
     83 * `!addfeed <RSS feed URL>`, adds an RSS feed URL
     84 * `!rmfeed <id>`, removes feed by number (given by `!lsfeeds`)
     85 * `!die`, kills the bot
     86 
     87 An alternate configuration file can be given as a parameter.