Steve Kemp 67a92c0ee8 Minor tweaks to README.md | 6 years ago | |
---|---|---|
webhook | 6 years ago | |
LICENSE | 6 years ago | |
README.md | 6 years ago | |
rss2hook.go | 6 years ago | |
sample.cfg | 6 years ago |
This project is a self-hosted utility which will make HTTP POST requests to remote web-hooks when new items appear in an RSS feed.
I have a couple of webhooks in-place already which will take incoming HTTP requests and "do stuff" with them, for example:
I also have a bunch of RSS feeds that I follow, typically these include github releases of projects. For example my git-host runs gitbucket so I subscribe to the release feed of that, to ensure I'm always up to date:
If you have a working golang setup you should be able to install this application via:
go get -u github.com/skx/rss2hook
go install github.com/skx/rss2hook
There are two parts to the setup:
For the first create a configuration-file like so:
http://example.com/feed.rss = https://webhook.example.com/notify/me
(There is a sample configuration file sample.cfg which will demonstrate this more verbosely.)
You can use your favourite supervision tool to launch the deamon, but you can test interactively like so:
$ rss2hook -config ./sample.cfg
There is a simple webserver located beneath webhook/ which will listen upon http://localhost:8080, and dump any POST submission to the console.
You can launch it like so:
cd webhook/
go run webhook.go
Testing it via curl
would look like this:
$ curl --header "Content-Type: application/json" \
--request POST \
--data '{"username":"blah","password":"blah"}' \
http://localhost:8080/
The sample.cfg file will POST to this end-point so you can see how things work:
$ rss2hook --config=sample.cfg
Turning this into a SaaS project would be interesting. A simple setup would be very straight-forward to implement, however at a larger scale it would get more interesting:
Anyway it would be fun to implement, but I'm not sure there is a decent revenue model out there for it. Especially when you can wire up IFTTT or similar system to do the same thing.