From 168d0e273b0cbe5307e8adef34f34d1dfd3e928c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8C=B4=E8=B2=93?= Date: Wed, 11 Sep 2024 06:07:18 +0800 Subject: [PATCH] Update __main__.py --- make-member-list/__main__.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/make-member-list/__main__.py b/make-member-list/__main__.py index 833062a..87e93bd 100644 --- a/make-member-list/__main__.py +++ b/make-member-list/__main__.py @@ -1,4 +1,3 @@ -import re import shutil from pathlib import Path from typing import Union @@ -8,6 +7,7 @@ ROW_LEN = 2 COLUMN_LEN = 8 +ALL_IN_ONE = False AVATAR_SIZE = 64 FONT_SIZE = 20 RIGHT_PADDING = 188 @@ -15,12 +15,6 @@ FORCE_DOWNLOAD = False -UUID_MATCH = re.compile( - r"([0-9a-f]{8})(?:-|)([0-9a-f]{4})(?:-|)" - r"(4[0-9a-f]{3})(?:-|)([89ab][0-9a-f]{3})(?:-|)([0-9a-f]{12})" -) - - MEMBERS_TABLE = [ "-Zonzer", "-Fallen_Monkey", @@ -128,4 +122,7 @@ def summon_member_list(images: list[Path], output_path: Union[str, Path] = "out" image.unlink() images.remove(image) + if ALL_IN_ONE: + COLUMN_LEN = round(len(images) / ROW_LEN) + summon_member_list(images, Path("out") / dir.name)