Skip to content

A Slackbot that receives an image as a slash command and returns it back in Doge meme format.

License

Notifications You must be signed in to change notification settings

abbycar/doge-a-chat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

doge-a-chat: A Slackbot that dogefies images

This is a Slack slash command chatbot written in Python that takes an image URL and dogefies it using Cloud Functions, Cloud Pub/Sub, and Cloud Vision. All images are saved in Cloud Storage. This is not an official Google product.

For example, the app takes this image:

And returns this image:

How it works

To kick off the process, a user enter the /doge command followed by the image URL they want to dogeify in a Slack channel.

doge slash

The functionality of this app is broken down into two Cloud Functions.

arch

doge-queue

Triggered by HTTP requests from the Slackbot.

Upon verifying the Slack equest, the function sends a message to Pub/Sub that contains the request data. The function returns a message back to the Slack channel in the meantime.

doge-a-chat working on it message!

doge-response

Triggered when a message is published to a specified Pub/Sub topic.

After doge-queue publishes its message to the Pub/Sub topic, doge-response opens the message to get the image URL. The image is run through Cloud Vision to get the labels associated with the image.

Pillow dogeifies the image using the labels as overlay text.

The image is uploaded to Cloud Storage and sent back to the Slack channel as a message.

doge response

About

A Slackbot that receives an image as a slash command and returns it back in Doge meme format.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages