Git Product home page Git Product logo

slack-metabot's Introduction

slack-metabot

Captures content metadata from Slack channels, at this point only photo EXIF data.

Prerequisites

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

Installing

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

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

slack-metabot's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

slack-metabot's Issues

connection failed. SSL warnings.

Was excited to find this project today, but even after getting a SLACK_BOT_TOKEN and SLACK_BOT_ID (and exported as environment variables in the shell used to launch this bot) I get errors:

/home/username/slack-metabot/metabot/local/lib/python2.7/site-packages/requests/packages/urllib3/util/ssl_.py:334: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
SNIMissingWarning
/home/username/slack-metabot/metabot/local/lib/python2.7/site-packages/requests/packages/urllib3/util/ssl_.py:132: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecurePlatformWarning
Connection failed. Invalid Slack token or bot ID?

I'm guessing with 2 years without updates this project has been abandoned and eventually broke as Slack probably changed their authentication methods. Its too bad as I can't find anything else out there that strips EXIF/GPS headers from images posted to slack teams.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.