Captures content metadata from Slack channels, at this point only photo EXIF data.
Slack-metabot targets Python 2.7 and requires slackclient, requests, geocoder and Pillow.
Configure the script environment.
virtualenv metabot
source metabot/bin/activate
git clone https://github.com/ryanohoro/slack-metabot.git
cd slack-metabot
pip install -r requirements.txt
To set up your bot in your team's slack, you'll need to add it to your team first using "Add bot integration".
https://my.slack.com/services/new/bot
Capture the API token and customize your bot.
Set the bot's token in your script environment:
export SLACK_BOT_TOKEN=xoxb-148375115045-zoDMcKWN6gRVS5tm7EyUphNo
You'll need your bot's ID value. Run the following code, then set the bot ID in your script environment.
https://github.com/mattmakai/slack-starterbot/blob/master/print_bot_id.py
export SLACK_BOT_ID=U1CA99M5C
Then spin up the bot.
python slack-metabot.py
You should then invite your bot to whichever channels you want to monitor from Slack.
/invite @metabot
To log what the bot does, set -v (verbosity) and redirect stdout to a file.
python slack-metabot.py > /var/log/slack-metabot.log &
For more information check out Matt's full tutorial on StarterBot:
https://www.fullstackpython.com/blog/build-first-slack-bot-python.html
This project is licensed under the MIT License - see the LICENSE.md file for details
- Code based on Matt Makai's slack-starterbot
- GPS EXIF code based on maxbellec's get_lat_lon_exif_pil.py