2018-07-15 12:23:11 +02:00
|
|
|
# feed-to-muc
|
|
|
|
|
2018-07-13 22:53:22 +02:00
|
|
|
## about
|
|
|
|
|
2023-09-29 20:23:11 +02:00
|
|
|
**feed-to-muc is no more actively developed.** It works ok enough and
|
|
|
|
I am not interested to add more features or fix corner cases where
|
|
|
|
it might fail. If you're looking for an actively developed alternative
|
|
|
|
you might want to have a look at [Morbot](https://codeberg.org/TheCoffeMaker/Morbot).
|
|
|
|
|
2018-07-15 20:26:09 +02:00
|
|
|
*feed-to-muc* is an XMPP bot which queries Atom or RSS newsfeeds and
|
2018-07-13 22:53:22 +02:00
|
|
|
posts the short summary to a XMPP MUC if there is a new article.
|
|
|
|
|
|
|
|
## disclaimer
|
|
|
|
|
|
|
|
I am no programmer and this bot is a result of a lot of *try and error*.
|
2018-07-15 12:23:11 +02:00
|
|
|
There are probably lots of quirks that are remains of some wrong paths
|
2018-07-13 22:53:22 +02:00
|
|
|
I went in between. Also a lot is probably solved in a *hacky way* due
|
2018-07-15 12:23:11 +02:00
|
|
|
to missing experience.
|
|
|
|
|
2018-07-13 22:53:22 +02:00
|
|
|
Anyway, it works (for me at least) and so I upload this here.
|
|
|
|
Recommendations about what can be done better improved and so on are
|
|
|
|
very welcome.
|
|
|
|
|
|
|
|
## requirements
|
|
|
|
|
2023-03-10 11:25:38 +01:00
|
|
|
* [go](https://golang.org/) >= 1.18
|
2018-07-13 22:53:22 +02:00
|
|
|
|
|
|
|
## installation
|
|
|
|
|
2023-03-10 11:20:15 +01:00
|
|
|
You will find the binary in `$GOPATH/bin` or, if set, `$GOBIN`.
|
|
|
|
|
|
|
|
```plain
|
2023-09-13 19:42:44 +02:00
|
|
|
$ go install salsa.debian.org/mdosch/feed-to-muc@latest
|
2023-03-10 11:20:15 +01:00
|
|
|
```
|
2018-07-13 22:53:22 +02:00
|
|
|
|
|
|
|
## configuration
|
|
|
|
|
2018-07-15 20:44:08 +02:00
|
|
|
If the flag `-config` is not used the configuration is expected at
|
2018-07-15 12:04:43 +02:00
|
|
|
`$HOME/.config/feed-to-muc/config.json` in this format:
|
2018-07-13 22:53:22 +02:00
|
|
|
|
2018-07-15 12:23:11 +02:00
|
|
|
```json
|
2018-07-13 22:53:22 +02:00
|
|
|
{
|
|
|
|
"ServerAddress": "example.com:5222",
|
|
|
|
"BotJid": "feedbot@example.com",
|
|
|
|
"Password": "ChangeThis!",
|
|
|
|
"Muc": "muc-to-feed@conference.example.com",
|
|
|
|
"MucNick": "feedbot",
|
2019-05-31 12:04:53 +02:00
|
|
|
"Contact": "xmpp:botadmin@example.com",
|
2018-07-13 22:53:22 +02:00
|
|
|
"MaxArticles": 5,
|
2018-09-05 20:40:41 +02:00
|
|
|
"RefreshTime": 30,
|
|
|
|
"NoExcerpt": false,
|
2019-05-31 12:04:53 +02:00
|
|
|
"Quiet": false,
|
2019-05-31 11:32:13 +02:00
|
|
|
"Filter": [ "submitted by", "[link]" ],
|
2020-07-06 21:06:00 +02:00
|
|
|
"FilterMessage": [ "Block me!", "Block me too!" ],
|
2018-07-15 12:23:11 +02:00
|
|
|
"Feeds": [ "https://www.debian.org/News/news",
|
2019-05-31 11:32:13 +02:00
|
|
|
"https://www.debian.org/security/dsa-long",
|
|
|
|
"https://www.reddit.com/r/FDroidUpdates/new.rss" ]
|
2018-07-13 22:53:22 +02:00
|
|
|
}
|
|
|
|
```
|
2018-09-05 20:40:41 +02:00
|
|
|
|
|
|
|
`MaxArticles` is the maximum number of articles that are sent per
|
|
|
|
feed and query. If `NoExcerpt` is set to *true* no excerpt will be
|
2022-08-21 12:07:30 +02:00
|
|
|
posted. `RefreshTime` defines the interval for checking the feeds
|
2019-05-31 11:32:13 +02:00
|
|
|
in seconds.
|
2019-05-31 12:04:53 +02:00
|
|
|
|
2019-05-31 11:32:13 +02:00
|
|
|
With `Filter` you can specify strings for filtering out lines
|
2020-07-06 21:06:00 +02:00
|
|
|
beginning with those strings, with `FilterMessage` you can filter
|
|
|
|
out complete postings containing the string.
|
2019-05-31 12:04:53 +02:00
|
|
|
|
|
|
|
`Contact` is for providing contact information about who is running
|
|
|
|
the bot.
|
|
|
|
|
|
|
|
If you don't want additional noise in the MUC you can set `Quiet`
|
|
|
|
to disable bot queries (e.g. *contact*) in the MUC (queries per
|
2019-05-31 12:36:30 +02:00
|
|
|
private message are still available).
|