https://github.com/controversial/dont-tread-on-memes
Don't tread on me(mes)
https://github.com/controversial/dont-tread-on-memes
Last synced: about 1 year ago
JSON representation
Don't tread on me(mes)
- Host: GitHub
- URL: https://github.com/controversial/dont-tread-on-memes
- Owner: controversial
- License: mit
- Created: 2017-01-07T04:51:27.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-14T21:48:04.000Z (over 9 years ago)
- Last Synced: 2025-04-19T10:13:15.526Z (about 1 year ago)
- Language: Python
- Size: 1.14 MB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Don't tread on memes
Don't tread on me(mes)
## Dependencies
- [`click`](http://click.pocoo.org/)
- [`Pillow`](https://python-pillow.org)
## 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."
```python
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 A message to use as a caption for the flag
--format / --no-format Whether to format the provided message as 'Don't
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:
