Here at D3 Estudio, Slack is our primary communication channel. Found a nice article? Slack. Found a cool gif? Slack. Want to spread the word about an event? Well, guess what? Slack.
We have been overusing the (relatively) new Reactions feature lately, and we stumbled on a nice idea: Why not create a digest based on these reactions?
Well, this is what Digest does: it watches channels through a bot and stores messages and their respective reactions.
Digest is distributed through a single Docker Image containing all required binaries:
$ docker pull d3estudio/digest:latest
In order to work, Digest needs a Mongo and Redis instance to connect to. Those servers addresses can be defined in the environment variables of the containers running each process:
DIGEST_TOKEN: Slack token used to authenticate and connect to your Slack team. This token can be obtained by Creating a New Slack Bot.
DIGEST_SILENCER_EMOJIS: A comma-separated string of reactions that will prevent a given message that contains it from appearing publicly. Please do note that this does not prevent a message from being stored. Defaults to
DIGEST_REDIS_SERVER: Address of the Redis server used for IPC. Defaults to
DIGEST_REDIS_PORT: Port of the Redis server used for IPC. Defaults to
DIGEST_MONGO_SERVER: URL of the Mongo server used for storing data and keeping indexes. It must be in following format
[mongodb://][user:pass@]host1[:port1][,host2[:port2],...][/database][?options], which allows it from being simple as
localhostto something more involved, like
27017as the default port, if not provided. Defaults to
DIGEST_MONGO_DATABASE: Name of the database that will hold collections created by the application. Defaults to
DIGEST_BASE_QUEUE_NAME: Name of the base name of all Redis queues. Useful if working with more than one instance on the same Redis server. Defaults to
DIGEST_TWITTER_SECRET: Used by the
prefetcherprocess to acquire oembed data from Twitter. Those keys are optional, but not providing them will prevent Digest from embeding tweets into the results. Defaults to
The development environment only requires a functional installation of the Go compiler and Godep, that is used to manage our dependencies. That said, everything you have to do is clone this repository into your
$GOPATH, head over to it and run
godep restore. This repository also contains a basic
docker-compose.yml that will spin up a Redis and Mongo instance.
MIT License Copyright (c) 2016 Victor Gama Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN D3 Estudio Newspaper Icon by ✦ Shmidt Sergey ✦ from the Noun Project