cclauss / dont-tread-on-memes

Don't tread on me(mes)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Don't tread on memes

Don't tread on me(mes)

Dependencies

Python interface

This program provides a simple python interface for generating "don't tread on memes."

A single method is exposed, tread_on which generates a PIL image of the "Don't Tread on Me" flag with a custom caption. A single parameter, phrase, represents the string with which to replace "tread on."

import dont_tread_on_memes
dont_tread_on_memes.tread_on("test text").show()  # Shows a PIL image of the flag captioned with "DON'T TEST TEXT ME"

CLI

After cloning the repository, you can run python3 -m dont_tread_on_memes from inside the repository root to use the CLI.

Usage: __main__.py [OPTIONS]

  Create a Don't Tread on Meme — an image of the Gadsden flag with the words
  "DONT TREAD ON ME" replaced by something else.

Options:
  --message <caption>     A message to use as a caption for the flag
  --format / --no-format  Whether to format the provided message as 'Don't
                          <caption> me' (default) or to use the provided
                          message as the entire caption.
  --save TEXT             Where to save the image
  --help                  Show this message and exit.

If --message is omitted, the user will be prompted to provide a message. If --save is omitted, the image will be displayed using PIL's PIL.ImageShow module.

Examples

An image generated via the CLI:

About

Don't tread on me(mes)

License:MIT License


Languages

Language:Python 100.0%