Steve Kemp 7637f9b0c2 Initial import | 6 éve | |
---|---|---|
webhook | 6 éve | |
LICENSE | 6 éve | |
README.md | 6 éve | |
rss2hook.go | 6 éve | |
sample.cfg | 6 éve |
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 is gitbucket so I subscribe to the release feed via:
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
...
For the second you can use your favourite supervision took, but in short you'll want to run something like this:
$ rss2hook -config ./sample.cfg
There is a simple webhook example beneath webhook/ which will listen upon 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":"xyz","password":"xyz"}' \
http://localhost:8080/
Finally you'd use the sample.cfg file to POST to this server by launching the application:
$ 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.