This commit is contained in:
암냥 2025-03-02 00:06:23 +09:00
commit f144aab824
7 changed files with 30 additions and 12 deletions

View file

@ -71,7 +71,7 @@ jobs:
- name: Start SOCKS proxy with SSH
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"
- name: Run application

View file

@ -56,11 +56,6 @@ jobs:
run: |
chmod +x app/run.sh app/gen-config.sh
- name: Generate Config
run: |
cd app
./gen-config.sh
- name: Add SSH private key
run: |
mkdir -p ~/.ssh
@ -69,9 +64,14 @@ jobs:
- name: Start SOCKS proxy with SSH
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"
- name: Generate Config
run: |
cd app
./gen-config.sh
- name: Run application
run: |
cd app

View file

@ -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.")

View file

@ -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"

View file

@ -6,6 +6,11 @@
"start": 20250208,
"end": 20250302,
"data": "겨울방학 & 봄방학"
},
"1": {
"start": 20250227,
"end": 20250227,
"data": "교과서 배부 및 반 배정 등교"
}
},
"03": {
@ -78,4 +83,4 @@
}
}
}
}
}

View file

@ -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")

View file

@ -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")}월 학사일정",