Coder Social home page Coder Social logo

meme-bot's Introduction

Meme-Bot

A reversed engineered version of ShitpostBot 5000 using Pillow (PIL-fork)

Instructions:

  • To add a template:

    You must manually capture the box where each source image will be pasted, inside sizes.json

    Inside sizes.json the legend goes as follows:

    • background = Background of the space where the source image is pasted. There are 3 options:

      • b = black background
      • w = white background
      • o = Over. Source Image is pasted on top of the template, there's no background
    • boxes = Is a list of the dictionaries (box) that contains info for box.

      Each box contains 2 keys that have tuples as values:

      • size = Size of the box
      • left_corner = Coordinates for the top-left corner of the box
      • Note: if you want to repeat the same Source Image used before, but at different coordinates and/or size, you need to add a new key called repeat_prev with True value. This is used in Templates/5.png

Side-note: If you prefer the previously used sizes.txt format instead of the current sizes.json, you can use the current release along with a script I made to convert sizes.txt to JSON format.

  • Regarding Source Images:

    Although not necessary, I recommend you to number the source images to easily identify the source images used in a given meme, since its filename is made using the format: Template-SrcImg1-SrcImg2-...-SrcImgN.png

  • Dependencies

    For the script to work you must have Pillow (a friendly PIL fork). You can install it using pip install Pillow or with easy_install Pillow. For more information on its documentation/installation go here.

And ta-da! You're ready to make some dank -but most importantly- randomly generated memes. Have fun!

Author's note:

If you wish to integrate the bot with Twitter I recommend this repository, although the non-repeating image validation doesn't work (16/09/2017).

My own fully-automated version: @OlaSoyUnBot_

meme-bot's People

Contributors

diegotf30 avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

Forkers

matgomes rajiteh

meme-bot's Issues

No support for multiple-layer templates

As of the moment, the script doesn't accept custom backgrounds nor layers above the template. You can only paste above an image (template) or overlay a template over source image(s)

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.