이게 맞나
This commit is contained in:
parent
a4c1b300ca
commit
1786b77f3c
7 changed files with 18 additions and 19 deletions
|
|
@ -43,6 +43,8 @@ def 급식_칼로리_얻기(MLSV_YMD:str):
|
|||
return 답장.json()['mealServiceDietInfo'][1]['row'][0]['CAL_INFO']
|
||||
|
||||
def 얻기(MLSV_YMD:str):
|
||||
if MLSV_YMD == "20250401":
|
||||
return
|
||||
print("집가고싶다발동")
|
||||
급식 = 급식_정보_얻기(MLSV_YMD)
|
||||
# print(f"{ROOT}/library/skeleton.png")
|
||||
|
|
@ -72,10 +74,10 @@ def 학사일정_얻기():
|
|||
print("서코가고싶다발동")
|
||||
오늘 = datetime.now() + timedelta(days=1)
|
||||
print("오늘은 사실", 오늘, "이였다")
|
||||
with open(f"{ROOT}/library/event/{오늘.strftime("%Y")}.json") as json_file:
|
||||
with open(f"{ROOT}/library/event/{오늘.strftime('%Y')}.json") as json_file:
|
||||
json_data = json.load(json_file)
|
||||
마지막_업데이트 = json_data["last_update"]
|
||||
학사일정 = json_data["event"][str(오늘.strftime("%m"))]
|
||||
학사일정 = json_data["event"][str(오늘.strftime('%m'))]
|
||||
# print(f"{ROOT}/library/skeleton.png")
|
||||
사진 = Image.open(f"{ROOT}/library/skeleton_schoolevent.png")
|
||||
|
||||
|
|
@ -102,15 +104,15 @@ def 학사일정_얻기():
|
|||
제목요소.text((75, 930 - i * 60), f"{date_text} : {일정['data']}", font=학사일정_폰트, anchor="ls", fill=(255, 255, 255))
|
||||
|
||||
세부요소 = ImageDraw.Draw(사진)
|
||||
세부요소.text((810, 80), f"{오늘.strftime("%Y")}년 {오늘.strftime("%m")}월", font=세부_폰트, fill=(255, 255, 255))
|
||||
세부요소.text((810, 80), f"{오늘.strftime('%Y')}년 {오늘.strftime('%m')}월", font=세부_폰트, fill=(255, 255, 255))
|
||||
def 포맷팅된_날짜(날짜:str):
|
||||
return f"{날짜[:4]}년 {날짜[4:6]}월 {날짜[6:8]}일"
|
||||
세부요소.text((591, 200), f"마지막 업데이트 : {포맷팅된_날짜(마지막_업데이트)}", font=세부_폰트, fill=(137, 202, 255))
|
||||
|
||||
사진.save(f'{ROOT}/temp/{오늘.strftime("%Y")}_{오늘.strftime("%m")}.png')
|
||||
사진.save(f"{ROOT}/temp/{오늘.strftime('%Y')}_{오늘.strftime('%m')}.png")
|
||||
print("🍲 | Meal Info Image Saved")
|
||||
|
||||
return f'{ROOT}/temp/{오늘.strftime("%Y")}_{오늘.strftime("%m")}.png'
|
||||
return f"{ROOT}/temp/{오늘.strftime('%Y')}_{오늘.strftime('%m')}.png"
|
||||
|
||||
def 스토리_얻기(MLSV_YMD:str):
|
||||
print("이건 왜?")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue