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
2
.github/workflows/python-app.yml
vendored
2
.github/workflows/python-app.yml
vendored
|
|
@ -71,7 +71,7 @@ jobs:
|
||||||
|
|
||||||
- name: Start SOCKS proxy with SSH
|
- name: Start SOCKS proxy with SSH
|
||||||
run: |
|
run: |
|
||||||
ssh -o StrictHostKeyChecking=no -i ~/.ssh/id_ed25519 -D 9999 -f -N imnyang@imnya.ng -p5322
|
ssh -o StrictHostKeyChecking=no -i ~/.ssh/id_ed25519 -D 9999 -f -N neko@imnya.ng -p5322
|
||||||
echo "SOCKS proxy started"
|
echo "SOCKS proxy started"
|
||||||
|
|
||||||
- name: Run application
|
- name: Run application
|
||||||
|
|
|
||||||
12
.github/workflows/school-event.yml
vendored
12
.github/workflows/school-event.yml
vendored
|
|
@ -56,11 +56,6 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
chmod +x app/run.sh app/gen-config.sh
|
chmod +x app/run.sh app/gen-config.sh
|
||||||
|
|
||||||
- name: Generate Config
|
|
||||||
run: |
|
|
||||||
cd app
|
|
||||||
./gen-config.sh
|
|
||||||
|
|
||||||
- name: Add SSH private key
|
- name: Add SSH private key
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
|
|
@ -69,9 +64,14 @@ jobs:
|
||||||
|
|
||||||
- name: Start SOCKS proxy with SSH
|
- name: Start SOCKS proxy with SSH
|
||||||
run: |
|
run: |
|
||||||
ssh -o StrictHostKeyChecking=no -i ~/.ssh/id_ed25519 -D 9999 -f -N imnyang@imnya.ng -p5322
|
ssh -o StrictHostKeyChecking=no -i ~/.ssh/id_ed25519 -D 9999 -f -N neko@imnya.ng -p5322
|
||||||
echo "SOCKS proxy started"
|
echo "SOCKS proxy started"
|
||||||
|
|
||||||
|
- name: Generate Config
|
||||||
|
run: |
|
||||||
|
cd app
|
||||||
|
./gen-config.sh
|
||||||
|
|
||||||
- name: Run application
|
- name: Run application
|
||||||
run: |
|
run: |
|
||||||
cd app
|
cd app
|
||||||
|
|
|
||||||
|
|
@ -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("📅 | Today is the last day of the month.")
|
||||||
print("📆 | Uploading School Event Post")
|
print("📆 | Uploading School Event Post")
|
||||||
학사일정_경로 = lib.학사일정_얻기(MLSV_YMD)
|
학사일정_경로 = lib.학사일정_얻기()
|
||||||
cl.photo_upload(
|
cl.photo_upload(
|
||||||
학사일정_경로,
|
학사일정_경로,
|
||||||
caption=f"#인천상정중학교 #상정중학교 #학사일정 \n{내일.strftime("%Y")}년 {내일.strftime("%m")}월 학사일정",
|
caption=f"#인천상정중학교 #상정중학교 #학사일정 \n{내일.strftime("%Y")}년 {내일.strftime("%m")}월 학사일정",
|
||||||
|
|
|
||||||
|
|
@ -29,4 +29,17 @@ cat > config.json << EOF
|
||||||
}
|
}
|
||||||
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"
|
echo "Successfully generated config.json"
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,11 @@
|
||||||
"start": 20250208,
|
"start": 20250208,
|
||||||
"end": 20250302,
|
"end": 20250302,
|
||||||
"data": "겨울방학 & 봄방학"
|
"data": "겨울방학 & 봄방학"
|
||||||
|
},
|
||||||
|
"1": {
|
||||||
|
"start": 20250227,
|
||||||
|
"end": 20250227,
|
||||||
|
"data": "교과서 배부 및 반 배정 등교"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"03": {
|
"03": {
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ def 학사일정_얻기():
|
||||||
세부_폰트 = ImageFont.truetype(font, 24)
|
세부_폰트 = ImageFont.truetype(font, 24)
|
||||||
|
|
||||||
제목요소 = ImageDraw.Draw(사진)
|
제목요소 = ImageDraw.Draw(사진)
|
||||||
for i, 일정 in enumerate(학사일정.values()):
|
for i, 일정 in enumerate(reversed(list(학사일정.values()))):
|
||||||
if 일정['data']:
|
if 일정['data']:
|
||||||
start_date = datetime.strptime(str(일정['start']), "%Y%m%d")
|
start_date = datetime.strptime(str(일정['start']), "%Y%m%d")
|
||||||
end_date = datetime.strptime(str(일정['end']), "%Y%m%d")
|
end_date = datetime.strptime(str(일정['end']), "%Y%m%d")
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ print("📅 | Date:", MLSV_YMD)
|
||||||
if 내일.month != 오늘.month:
|
if 내일.month != 오늘.month:
|
||||||
print("📅 | Today is the last day of the month.")
|
print("📅 | Today is the last day of the month.")
|
||||||
print("📆 | Uploading School Event Post")
|
print("📆 | Uploading School Event Post")
|
||||||
학사일정_경로 = lib.학사일정_얻기(MLSV_YMD)
|
학사일정_경로 = lib.학사일정_얻기()
|
||||||
cl.photo_upload(
|
cl.photo_upload(
|
||||||
학사일정_경로,
|
학사일정_경로,
|
||||||
caption=f"#인천상정중학교 #상정중학교 #학사일정 \n{내일.strftime("%Y")}년 {내일.strftime("%m")}월 학사일정",
|
caption=f"#인천상정중학교 #상정중학교 #학사일정 \n{내일.strftime("%Y")}년 {내일.strftime("%m")}월 학사일정",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue