임시 커밋

This commit is contained in:
암냥 2025-02-08 21:10:40 +09:00
commit ba11447da1
5 changed files with 55 additions and 0 deletions

View file

@ -15,6 +15,7 @@ from PIL import ImageFont
import library.vts as vts import library.vts as vts
import os import os
from datetime import datetime
with open('./config.json') as json_file: with open('./config.json') as json_file:
json_data = json.load(json_file) json_data = json.load(json_file)
@ -65,6 +66,30 @@ def 얻기(MLSV_YMD:str):
print("🍲 | Meal Info Image Saved") print("🍲 | Meal Info Image Saved")
def 학사일정_얻기():
print("서코가고싶다발동")
오늘 = datetime.now()
학사일정 = ""
# print(f"{ROOT}/library/skeleton.png")
사진 = Image.open(f"{ROOT}/library/skeleton_schoolevent.png")
#if vts.get_vts_true_or_false() == True: 사진 = Image.open(f'{ROOT}/library/skeleton-vts.png')
학사일정_폰트 = ImageFont.truetype(font, 56)
세부_폰트 = ImageFont.truetype(font, 24)
제목요소 = ImageDraw.Draw(사진)
for i, line in enumerate(reversed(학사일정.split('\n'))):
제목요소.text((75, 930 - i * 60), line, font=학사일정_폰트, anchor="ls", fill=(255, 255, 255))
세부요소 = ImageDraw.Draw(사진)
세부요소.text((767, 80), f"{오늘.strftime("%Y")}{오늘.strftime("%m")}", font=세부_폰트, fill=(255, 255, 255))
#세부요소.text((825, 200), f"{급식_칼로리_얻기(MLSV_YMD)}", font=세부_폰트, fill=(137, 202, 255))
사진.save(f'{ROOT}/temp/{오늘.strftime("%Y")}_{오늘.strftime("%m")}월.png')
print("🍲 | Meal Info Image Saved")
def 스토리_얻기(MLSV_YMD:str): def 스토리_얻기(MLSV_YMD:str):
print("이건 왜?") print("이건 왜?")
# 1:1 to 9:16 temp/{MLSV_YMD}.png # 1:1 to 9:16 temp/{MLSV_YMD}.png

View file

@ -0,0 +1,14 @@
{
"1": {
"0": {
"start": 20250208,
"end": 20250302,
"data": "겨울방학"
},
"1": {
"start": 20250303,
"end": 20250303,
"data": ""
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View file

@ -52,6 +52,19 @@ print("🗨️ | Uploading at Discord")
lib.디스코드(MLSV_YMD) lib.디스코드(MLSV_YMD)
print("🗨️ | Uploaded at Discord") print("🗨️ | Uploaded at Discord")
print(f"📆 | Today Date : {MLSV_YMD}")
# Check if today is the last day of the month
today = datetime.now()
first_day_of_next_month = today.replace(day=28) + timedelta(days=4)
last_day_of_this_month = first_day_of_next_month - timedelta(days=first_day_of_next_month.day)
if today.date() == last_day_of_this_month.date():
print("📅 | Today is the last day of the month.")
print("📆 | Uploading School Event Post")
lib.학사일정_얻기(MLSV_YMD)
print("📆 | School Event Post Uploaded")
else:
print("📅 | Today is not the last day of the month.")
print("🎉 | All tasks completed.") print("🎉 | All tasks completed.")
# Calculate running time # Calculate running time
print("🕒 | Running Time:", datetime.now() - start_time) print("🕒 | Running Time:", datetime.now() - start_time)

3
app/temp.py Normal file
View file

@ -0,0 +1,3 @@
import library.lib as 라이브러리
라이브러리.학사일정_얻기()