A bot that stores all messages and enables full deep search and statistics via in-app commands.
npm install
sqlite3 db.sqlite < structure.sqlite
You must as well copy config.json.dist
to config.json
and edit the relevant configuration herein.
node index.js
You must configure the Slack payload token that will be used to grant access to POST request from Slack, and also a token for GET access for the standalone pages.
If you plan on using the commands, you must as well configure the Slack command token.
All tokens reside in config.json
.
A complete history (excluding bots, and emoji reactions) of each channel is available here :
The search command is /history "search terms or phrase"
.
It is a full-text search which is performed against the whole database through SQLite's FTS4.
A "see more" link will redirect to the backend for the actual search, and will display all results. You can access this view directly at :
http://your.host/search/[channel]/[terms_url_encoded]
The global statistics command is /stats
.
The following stat block will be displayed :
| User | Most common word | Messages total |
--------------------------------------------------------------------------
| @user1 | oklm (1492 occurences) | 56 023 (3/d.avg)|
| @user2 | oklm (1492 occurences) | 34 195 (3/d.avg)|
...
| @userN | oklm (1492 occurences) | 123 475 (3/d.avg)|
MIT.