Github Actions의 설정과 학사일정의 대한 정보 추가 및 인스타 업로드 연동

This commit is contained in:
암냥 2025-02-11 23:53:09 +09:00
commit 468676c432
5 changed files with 201 additions and 78 deletions

View file

@ -54,13 +54,18 @@ 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():
오늘 = datetime.today()
내일 = 오늘 + timedelta(days=1)
if 내일.month != 오늘.month:
print("📅 | Today is the last day of the month.")
print("📆 | Uploading School Event Post")
lib.학사일정_얻기(MLSV_YMD)
학사일정_경로 = lib.학사일정_얻기(MLSV_YMD)
cl.photo_upload(
학사일정_경로,
caption=f"#인천상정중학교 #상정중학교 #학사일정 \n{내일.strftime("%Y")}{내일.strftime("%m")}월 학사일정",
extra_data={'is_paid_partnership': False}
)
print("📆 | School Event Post Uploaded")
else:
print("📅 | Today is not the last day of the month.")