maimai

Crates.iomaimai
lib.rsmaimai
version0.1.1
created_at2025-06-07 13:40:31.501208+00
updated_at2025-06-07 13:57:34.489553+00
descriptionMarkup-based meme generator
homepagehttps://d-k-bo.codeberg.page/maimai/
repositoryhttps://codeberg.org/d-k-bo/maimai
max_upload_size
id1704048
size1,125,452
David C. (d-k-bo)

documentation

README

maimai

Build Status crates.io Documentation License Repository

maimai (['maɪ̯maɪ̯], Zangendeutsch for “meme”) provides a command-line application and a Rust library to generate Memes based on a declarative text format.

This is intended to be an alternative to popular WYSIWYG meme editors, that don’t give you much control and often have problems creating reproducable, high quality content.

All image templates used in this project were hand-drawn by Gee for Framamèmes and published under the the terms of the CC-0 License.

Usage

In many cases, a meme is created from 3 “layers”:

  • the base image (often taken from a popular TV show or from stock images)
  • the text layout that defines, where text is placed on the base image and how it is formatted
  • the text content

The first two “layer” are usually shared between different memes and the text content is replaced for a different joke.

A maimai meme definition is written as a TOML document that can extend other meme definions. This allows implementing the pattern described above.

Source Result
# examples/templates/sophie-no-yes.toml

image = "sophie-no-yes.png"

[text.no]
text = "Bad text"
position = [420, 20]
size = [360, 360]
color = "black"
font-size = 60

[text.yes]
text = "Good text"
position = [420, 420]
size = [360, 360]
color = "black"
font-size = 60

# examples/reuse.toml

extends = "templates/sophie-no-yes.toml"

[text]
no = "Creating everything from scratch"
yes = "Reusing your work"

License

This project is licensed under the GNU Affero General Public License version 3 or (at your option) any later version (AGPL-3.0-or-later).

Commit count: 0

cargo fmt