4.5 KiB
Meme-Otron guide
Commands
Simple use
You can generate memes by using the following arguments:
[meme id] "text1" "text2" ...
Depending of the number of "text" arguments, several behavior occurs:
- None: you get the template that gives you the locations of texts. (see below)
- Less than the template's: the remaining texts are blank on the output
- More than the template's: the extra arguments are ignored
Notes
- You don't have to use all texts shown on the templates
- You can use an empty text argument (
"") to skip a text and keep it blank
See Examples to get an idea of how to use it.
Advanced use
Since version 1.3, Meme-Otron allows you to "pipe" parts in order to compose more advanced memes. The syntax is as follows:
[part1] - [part2] - ...
Each part can be one of the following:
- A template: as described in Simple use
- Texts:
text "text 1" "text 2" ...- Black Arial texts on white background
- Each text is it's own paragraph
- Images:
image <URL>- Takes an image from input or an URL (optional)
- Input depends on the system:
- the Discord bot takes the attachment
- the CLI takes stdin or
--inputargument.
Notes
- Input of
imageis always the same, don't expect multiple instances ofimageto get different results if you don't indicate an URL
See Examples to get an idea of how to use it.
Discord features
Tag the bot and use the above syntax to get started. In addition, you can use the following commands:
- Use
helpto get a simple help message - Use
listto get a list of all meme ids - Use
deleteto delete the last message sent by the bot (directed to you)
To get the template info, just send the meme id without texts.
Tip : You can use
\\nin your texts to add a line break
Enjoy the full experience of this bot by using direct messages to keep your server free of spam.
CLI features
In this project directory, you can simply call:
python -m meme_otron [meme id] "text1" "text2" ... > output.jpg
Without pipe redirection with -o [output]:
python -m meme_otron -o output.png [meme id] "text1" "text2" ...
You can even pipe input images like this:
python -m meme_otron [arguments] < input.jpg > output.jpg
Available arguments:
--help/-h- Show a simple guide
--output [file]/-o [file]- Output file, you are free to choose the format
--input [file]/-i [file]- Input file used for
image
- Input file used for
-nw/--no-watermark- Removes the watermark
-d/--debug- Add more info to output like a box show the texts boundaries
-v/--verbose- Add more logging
List of templates
You can find here the full list of templates. Each one has extra info and an image showing how texts are placed. Click on an image to enlarge it.