VTS 초보

This commit is contained in:
암냥 2025-03-02 23:23:45 +09:00
commit 4140406c88
4 changed files with 56 additions and 51 deletions

View file

@ -42,7 +42,6 @@ def 급식_칼로리_얻기(MLSV_YMD:str):
)
return 답장.json()['mealServiceDietInfo'][1]['row'][0]['CAL_INFO']
def 얻기(MLSV_YMD:str):
print("집가고싶다발동")
급식 = 급식_정보_얻기(MLSV_YMD)
@ -59,8 +58,11 @@ def 얻기(MLSV_YMD:str):
제목요소.text((75, 930 - i * 60), line, font=급식_폰트, anchor="ls", fill=(255, 255, 255))
세부요소 = ImageDraw.Draw(사진)
세부요소.text((767, 80), f"{MLSV_YMD[:4]}{MLSV_YMD[4:6]}{MLSV_YMD[6:8]}", font=세부_폰트, fill=(255, 255, 255))
세부요소.text((825, 200), f"{급식_칼로리_얻기(MLSV_YMD)}", font=세부_폰트, fill=(137, 202, 255))
세부요소.text((945, 110), f"{MLSV_YMD[:4]}{MLSV_YMD[4:6]}{MLSV_YMD[6:8]}", font=세부_폰트, anchor="rs", fill=(255, 255, 255))
#세부요소.text((755, 80), f"2025년 01월 01일", font=세부_폰트, fill=(255, 255, 255))
세부요소.text((945, 220), f"{급식_칼로리_얻기(MLSV_YMD)}", font=세부_폰트, anchor="rs", fill=(137, 202, 255))
if vts.VTS임(MLSV_YMD):
세부요소.text((830, 225), "with V.T.S.", font=세부_폰트, fill=(205, 173, 148))
사진.save(f'{ROOT}/temp/{MLSV_YMD}.png')
@ -114,7 +116,10 @@ def 스토리_얻기(MLSV_YMD:str):
print("이건 왜?")
# 1:1 to 9:16 temp/{MLSV_YMD}.png
사진 = None
사진 = Image.open(f"{ROOT}/temp/{MLSV_YMD}.png")
가로, 세로 = 사진.size
비율 = 9 / 16
가로_비율 = 가로 / 세로
@ -150,6 +155,10 @@ def 디스코드(MLSV_YMD:str):
}
]
if vts.VTS임(MLSV_YMD):
data["content"] = f"{MLSV_YMD} | with V.T.S."
print("🏓 | Sending Payload")
result = requests.post(WEBHOOK_URL, json = data)
print("🏓 | Payload Sent")