Merge branch 'main' of https://github.com/imnyang/today.isangjeong
This commit is contained in:
commit
f144aab824
7 changed files with 30 additions and 12 deletions
|
|
@ -21,7 +21,7 @@ MLSV_YMD = (datetime.now() + timedelta(days=1)).strftime('%Y%m%d')
|
|||
|
||||
print("📅 | Today is the last day of the month.")
|
||||
print("📆 | Uploading School Event Post")
|
||||
학사일정_경로 = lib.학사일정_얻기(MLSV_YMD)
|
||||
학사일정_경로 = lib.학사일정_얻기()
|
||||
cl.photo_upload(
|
||||
학사일정_경로,
|
||||
caption=f"#인천상정중학교 #상정중학교 #학사일정 \n{내일.strftime("%Y")}년 {내일.strftime("%m")}월 학사일정",
|
||||
|
|
@ -30,4 +30,4 @@ cl.photo_upload(
|
|||
|
||||
print("📆 | School Event Post Uploaded")
|
||||
|
||||
print("🎉 | All tasks completed.")
|
||||
print("🎉 | All tasks completed.")
|
||||
|
|
|
|||
|
|
@ -29,4 +29,17 @@ cat > config.json << EOF
|
|||
}
|
||||
EOF
|
||||
|
||||
if [ ! -d "temp" ]; then
|
||||
mkdir temp
|
||||
fi
|
||||
if [ ! -d "temp/auth" ]; then
|
||||
mkdir temp/auth
|
||||
fi
|
||||
|
||||
# If doesn't have temp/cookies.json, create it
|
||||
if [ ! -f "./temp/auth/cookies.json" ]; then
|
||||
mkdir temp/auth
|
||||
python3 library/init-auth.py
|
||||
fi
|
||||
|
||||
echo "Successfully generated config.json"
|
||||
|
|
|
|||
|
|
@ -6,6 +6,11 @@
|
|||
"start": 20250208,
|
||||
"end": 20250302,
|
||||
"data": "겨울방학 & 봄방학"
|
||||
},
|
||||
"1": {
|
||||
"start": 20250227,
|
||||
"end": 20250227,
|
||||
"data": "교과서 배부 및 반 배정 등교"
|
||||
}
|
||||
},
|
||||
"03": {
|
||||
|
|
@ -78,4 +83,4 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ def 학사일정_얻기():
|
|||
세부_폰트 = ImageFont.truetype(font, 24)
|
||||
|
||||
제목요소 = ImageDraw.Draw(사진)
|
||||
for i, 일정 in enumerate(학사일정.values()):
|
||||
for i, 일정 in enumerate(reversed(list(학사일정.values()))):
|
||||
if 일정['data']:
|
||||
start_date = datetime.strptime(str(일정['start']), "%Y%m%d")
|
||||
end_date = datetime.strptime(str(일정['end']), "%Y%m%d")
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ print("📅 | Date:", MLSV_YMD)
|
|||
if 내일.month != 오늘.month:
|
||||
print("📅 | Today is the last day of the month.")
|
||||
print("📆 | Uploading School Event Post")
|
||||
학사일정_경로 = lib.학사일정_얻기(MLSV_YMD)
|
||||
학사일정_경로 = lib.학사일정_얻기()
|
||||
cl.photo_upload(
|
||||
학사일정_경로,
|
||||
caption=f"#인천상정중학교 #상정중학교 #학사일정 \n{내일.strftime("%Y")}년 {내일.strftime("%m")}월 학사일정",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue