Skip to content
Twitter bot for Geometrize, a tool for geometrizing images into geometric primitives
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bot
geometrize
image_data
screenshots
script
.appveyor.yml
.gitignore
.travis.yml
LICENSE
README.md
build_appveyor.cmd
trigger_travis.sh

README.md

Geometrize Twitter bot logo

License Travis Twitter Bot Build Status AppVeyor Twitter Bot Build Status Travis Twitter Bot Docs Build Status

Twitter bot for Geometrize, an app for geometrizing images into geometric primitives. The bot waits for images to be tweeted at it. It geometrizes images it receives into shapes, and posts the results on Twitter.

Geometrized Forest

Usage

Tweet an image at the bot for a random result:

@Geometrizer Hi, geometrize bot!

Or tweet the specific numbers of shapes you want the bot to use, in the order they should be added to the image:

@Geometrizer rotated_ellipses=50 circles=50 rotated_rectangles=100 triangles=30 - thanks Geometrize bot!

Here is an example of how it is done:

Example Geometrize Bot Tweet

Development

Prerequisites

  • Get a copy of Geometrize. Install or copy it into the geometrize subfolder.
  • Install Python 3.x, pip, and the tweepy and Pillow libraries.
  • A fresh Twitter app on the Twitter apps dashboard.

Setup

Fill in the Twitter app credentials in config.py and then run the bot:

python bot.py

The bot should connect to the Twitter streaming API. Console output should look like this.

Tweet an image at the bot. After a few moments, the bot will tweet a geometrized version back at you.

Notes

  • If you want to develop the bot further, take a look at the documentation.
  • Got an idea or suggestion? Open an issue on GitHub, or send Sam a message on Twitter.
  • This bot was inspired by primitive, a Go library created by Michael Fogleman.
You can’t perform that action at this time.