mirror of
https://salsa.debian.org/mdosch/feed-to-muc.git
synced 2024-11-13 01:36:49 +01:00
48 lines
1.3 KiB
Markdown
48 lines
1.3 KiB
Markdown
|
## about
|
||
|
|
||
|
*feed-to-muc* is a XMPP which queries Atom or RSS newsfeeds and
|
||
|
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*.
|
||
|
There are probably lots of quirks that are remains of some wrong paths
|
||
|
I went in between. Also a lot is probably solved in a *hacky way* due
|
||
|
to missing experience.
|
||
|
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
|
||
|
|
||
|
* [go](https://golang.org/)
|
||
|
|
||
|
## installation
|
||
|
|
||
|
If you have *[GOPATH](https://github.com/golang/go/wiki/SettingGOPATH)*
|
||
|
set just run this commands:
|
||
|
|
||
|
```
|
||
|
$ go get salsa.debian.org/mdosch-guest/feed-to-muc
|
||
|
$ go install salsa.debian.org/mdosch-guest/feed-to-muc
|
||
|
```
|
||
|
|
||
|
You will find the binary in `$GOPATH/bin` or, if set, `$GOBIN`.
|
||
|
|
||
|
## configuration
|
||
|
|
||
|
The configuration is expected at `$HOME/.config/gowttr/config.json` with this format:
|
||
|
|
||
|
```
|
||
|
{
|
||
|
"ServerAddress": "example.com:5222",
|
||
|
"BotJid": "feedbot@example.com",
|
||
|
"Password": "ChangeThis!",
|
||
|
"Muc": "muc-to-feed@conference.example.com",
|
||
|
"MucNick": "feedbot",
|
||
|
"MaxArticles": 5,
|
||
|
"Feeds": [ "https://www.debian.org/News/news",
|
||
|
"https://www.debian.org/security/dsa-long" ]
|
||
|
}
|
||
|
```
|