We're on pypi.
pip install jarjarYou can use jarjar without a config file, but you'll need to tell it your slack webhook and channel each time.
You don't want to live that way.
Jarjar looks to a special config file for a default webhook, channel, and message values. You can over-ride anything in the config file any time but its nice not to have your webhook in each script, amirite??
The file looks like:
channel='@username'
message='Custom message'
webhook='https://hooks.slack.com/services/your/teams/webhook'Jarjar looks for values in descending order of priority:
- Any argument provided to
jarjar().text()orjarjar().attach()at runtime. - Any argument provided to
jarjar()at initialization. - Defaults within a file at a user-specified path (
config='...'), provided tojarjar()at initialization. - Defaults within a config file
.jarjar, in the working directory. - Defaults within
.jarjar, located in the user's home directory (~).
For this to work in the first place, you need to set up a slack webhook for your team.
While you're doing that, you can also specify a custom name and custom icon. We named our webhook robot jar-jar, and we used this icon, so messages look like this:
These days slack suggests users configure webhooks through an app, but you can still set up an old-style webhook. Jarjar was written to use the old style-hooks, but both kinds will work - with one caveat.
Under the new webhook setup, individual webhooks send messages to a single channel, so Jarjar's channel='@me' functionality will not work. Jarjar expects to use an old-style hook so it requires a channel to be specified even if you are using a new-style hook (sorry about that!).
