Skip to content

Commit

Permalink
add: fight_with_sunuo (#93)
Browse files Browse the repository at this point in the history
* add: fight_with_sunuo

我打宿傩?真的假的

* style: auto fix by pre-commit hooks

* feat: 优化了一点点图片

* perf: 添加了左右选项

* style: auto fix by pre-commit hooks

* fixed: 改了个bug

* style: auto fix by pre-commit hooks

* fixed: 改了一点点

* style: 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
fireinsect and pre-commit-ci[bot] authored Apr 3, 2024
1 parent 9afc168 commit 5f43560
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions meme_generator/memes/fight_with_sunuo/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
from pathlib import Path
from typing import List

from pil_utils import BuildImage

from meme_generator import add_meme
from meme_generator.utils import make_jpg_or_gif

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


def fight_with_sunuo(images: List[BuildImage], texts, args):
frame = BuildImage.open(img_dir / "0.png")

def make(img: BuildImage) -> BuildImage:
img = img.convert("RGBA").resize((565, 1630), keep_ratio=True)
return frame.copy().paste(img, (0, 245), below=True)

return make_jpg_or_gif(images[0], make)


add_meme(
"fight_with_sunuo",
fight_with_sunuo,
min_images=1,
max_images=1,
keywords=["我打宿傩", "我打宿傩吗"],
)
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 5f43560

Please sign in to comment.