eeic2020 / slack-patron

Log and view all Slack messages.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Slack patron

Log and view all Slack messages.

PR is welcome!!

http://i.gyazo.com/626298851b7eb9a878b72ccc788b7086.png

What Slack patron do?

  • Log slack messages, channels, users in MongoDB.
    • Also, you can import all data with backup file.
  • View these data in web browser.

1. Setup

This app needs access token from Slack.

Get access token from here (or use test token).

Then, generate config.yml with this command:

$ ruby ./bin/init.rb --token=YOUR_ACCESS_TOKEN

You can edit config.yml for more configuration.

2-A. Deploy with docker

To deploy with docker, just run these commands!

$ docker-compose up -d
$ open http://localhost:9292 # open http://localhost:9292 in your browser

2-B. Deploy without docker

You should edit config.yml and specify the location of mongo.

Requirements

  • ruby: 2.4.1p111
  • mongo db: v3.2.11
  • node.js: v8.5.0

2-B-1. Setup

$ mongod # you need to start mongo db server
$ bundle install

2-B-2. Start Slack Message Logger

$ bundle exec ruby ./logger/logger.rb

2-B-3. Start Slack Message Viewer

$ ./viewer/setup.sh
$ bundle exec rackup ./viewer/config.ru
$ open http://localhost:9292 # open http://localhost:9292 in your browser

3. Import Slack backup file

3-A. With GUI (in viewer)

Import dialog will appear when you click team name in viewer.

3-B. With Command Line

The size of Slack backup file is big and sometimes it is difficult to upload it with viewer.

You can import Slack backup file with this command.

$ bundle exec ruby ./bin/import.rb PATH_TO_BACKUP_FILE

About

Log and view all Slack messages.

License:MIT License


Languages

Language:JavaScript 54.9%Language:Ruby 22.2%Language:CSS 14.1%Language:Shell 5.7%Language:Dockerfile 2.4%Language:HTML 0.7%