Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
The project lacked proper README.md documentation. I added a better
description of the module, usage and configuration information, as well
as info about issues and pull requests, and the license.
  • Loading branch information
snorremd committed Oct 10, 2015
1 parent 5b07c5d commit e7488f0
Showing 1 changed file with 59 additions and 2 deletions.
61 changes: 59 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,59 @@
# ghost-slack-integration
Super simple Ghost blog Slack-integration to notify Slack channel upon new posts.
# rss-slack-integration
This module implements a super simple rss feed Slack integration that posts a
notification to a Slack group channel when new posts are added to the feed.

The module is a thin wrapper around the excellent
[rss-watcher module](https://www.npmjs.com/package/rss-watcher). It essentially
uses the rss-watcher's `new article` event to fetch the article title and url,
and does a post request to a given Slack group's incoming web hook URL with a
message consisting of the article title and url.

## Installation

Simply install in project using `npm install --save rss-slack-integration`.


## Usage and Configuration

The module is very simple. It exposes a single function `start` which expects a
configuration object as its sole parameter.

Example usage:

```JavaScript
var rsi = require("rss-slack-integration");

rsi.start({
feed: "https://example.com/rss",
interval: 60,
slackHook: "https://hooks.slack.com/services/yourservicehash",
slackIcon: "https://example.com/icon.png",
slackBotUser: "Bot Username"})
```
The `feed` property should be the URL of the rss feed you want to receive
updates about. Take care to provide the protocol part of the URL. The `interval`
property specifies the number of seconds between each poll of the rss feed.
Setting this to `60` means that the `rss-watcher` module will poll the
rss-feed for changes once a minute.

The `slackHook` property should be set to whatever URL was generated by Slack
when you created the
[incoming webhook](https://api.slack.com/incoming-webhooks). The `slackIcon`
property should be set to the URL of the icon you want to use for the Slack
bot. The last property, `slackBotUser` should be set to whatever bot name you
want your Slack web hook messages to appear under, for example the name of the
rss feed's site.

## Issues and contributions

If you experience any issues with this module you can submit issues at the
[project's Github Repository](https://github.com/pilsprog/rss-slack-integration/issues).

Any help towards improving this module is welcome. If you want to add features
or fix bugs you are welcome to submit a
[pull request](https://github.com/pilsprog/rss-slack-integration/pulls).

## License

This project is licensed under MIT. See the
[LICENSE file](https://github.com/pilsprog/rss-slack-integration/blob/master/LICENSE).

0 comments on commit e7488f0

Please sign in to comment.