refactor: basic logging
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
import logging
|
||||
|
||||
from PIL import Image, ImageDraw
|
||||
|
||||
from ..display import get_display
|
||||
from ..forge_data import ForgeData
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
def debug_image(im: Image.Image) -> None:
|
||||
im = im.resize((1280, 640)).convert("RGB")
|
||||
@@ -15,6 +18,7 @@ def debug_image(im: Image.Image) -> None:
|
||||
draw2.line((0, y * 10, 1280, y * 10), fill=(50, 50, 50))
|
||||
|
||||
im.resize((1280, 640)).save("debug.png")
|
||||
log.info("Debug image saved as debug.png")
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import logging
|
||||
|
||||
from PIL import ImageDraw
|
||||
|
||||
from ..constants import (
|
||||
@@ -6,6 +8,7 @@ from ..constants import (
|
||||
)
|
||||
from ..display import BLANK_IMG, FONT_1, FONT_2
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
def generate_loading_image() -> None:
|
||||
im = BLANK_IMG.copy()
|
||||
@@ -16,6 +19,7 @@ def generate_loading_image() -> None:
|
||||
draw.rectangle((24, 35, 104, 40), outline="white", fill="black")
|
||||
|
||||
im.save(LOADING_IMG_PATH)
|
||||
log.info(f"Generated {LOADING_IMG_PATH}")
|
||||
|
||||
|
||||
def generate_background_image() -> None:
|
||||
@@ -53,6 +57,7 @@ def generate_background_image() -> None:
|
||||
draw.circle((71, 61), 2, outline="white", fill="black")
|
||||
|
||||
im.save(BACKGROUND_IMG_PATH)
|
||||
log.info(f"Generated {BACKGROUND_IMG_PATH}")
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
Reference in New Issue
Block a user