Skip to content

Commit

Permalink
添加表情:鞭策 (#16)
Browse files Browse the repository at this point in the history
* 添加表情:小撅

* 🚨 auto fix by pre-commit hooks

* 添加表情:鞭策

* 🚨 auto fix by pre-commit hooks

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
jcjrobert and pre-commit-ci[bot] committed Jul 23, 2024
1 parent dc0cc9b commit 333b2b3
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions memes/lash/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
from pathlib import Path

from meme_generator import add_meme
from meme_generator.utils import save_gif
from PIL.Image import Image as IMG
from pil_utils import BuildImage

img_dir = Path(__file__).parent / "images"


def lash(images: list[BuildImage], texts, args):
self_head = images[0].convert("RGBA").circle().resize((22, 22))
user_head = images[1].convert("RGBA").circle().resize((22, 22))
# fmt: off
self_locs = [
(84,25), (87,23), (87,27), (86,28), (62,26),
(59,28), (76,20), (85,24), (80,23),
]
user_locs = [
(12,69), (15,66), (14,67), (15,66), (17,67),
(14,63), (21,56), (15,62), (17,69)
]
# fmt: on
frames: list[IMG] = []
for i in range(9):
frame = BuildImage.open(img_dir / f"{i}.png")
frame.paste(self_head, self_locs[i], alpha=True)
frame.paste(user_head, user_locs[i], alpha=True)
frames.append(frame.image)
return save_gif(frames, 0.05)


add_meme("lash", lash, min_images=2, max_images=2, keywords=["鞭笞", "鞭打", "鞭挞", "鞭策"])
Binary file added memes/lash/images/0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added memes/lash/images/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added memes/lash/images/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added memes/lash/images/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added memes/lash/images/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added memes/lash/images/5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added memes/lash/images/6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added memes/lash/images/7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added memes/lash/images/8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 333b2b3

Please sign in to comment.