Repository navigation
Setup Guide
โMinjung edited this page Sep 26, 2026
·
1 revision
- Python 3.11+
- Gmail ๊ณ์ (์ฑ ๋น๋ฐ๋ฒํธ ํ์)
- Groq API ํค
git clone https://github.com/minjungsung/hackdigest.git
cd hackdigestpip install -r requirements.txt์ฃผ์ ์์กด์ฑ:
| ํจํค์ง | ๋ฒ์ | ์ฉ๋ |
|---|---|---|
feedparser |
6.0.14 | RSS ํผ๋ ํ์ฑ |
requests |
2.33.0 | HTTP ์์ฒญ |
trafilatura |
1.12.2 | ๊ธฐ์ฌ ๋ณธ๋ฌธ ์ถ์ถ |
export GROQ_API_KEY="gsk_..."
export EMAIL_FROM="your-email@gmail.com"
export EMAIL_APP_PASSWORD="xxxx xxxx xxxx xxxx"
export EMAIL_TEST_TO="test@example.com" # ํ
์คํธ ๋ชจ๋| ๋ณ์ | ํ์ | ์ค๋ช |
|---|---|---|
GROQ_API_KEY |
โ | Groq Console์์ ๋ฐ๊ธ |
EMAIL_FROM |
โ | Gmail ๋ฐ์ ์ฃผ์ |
EMAIL_APP_PASSWORD |
โ | Gmail ์ฑ ๋น๋ฐ๋ฒํธ (์์ฑ ๋ฐฉ๋ฒ) |
EMAIL_TEST_TO |
โ | ์ค์ ์ ํ ์คํธ ๋ชจ๋: ์ด ์ฃผ์๋ก๋ง ๋ฐ์ก |
# ํ
์คํธ ๋ชจ๋ (EMAIL_TEST_TO๋ก๋ง ๋ฐ์ก)
EMAIL_TEST_TO="you@example.com" python -m src.main
# ์ ์ฒด ๊ตฌ๋
์์๊ฒ ๋ฐ์ก (์ฃผ์!)
python -m src.mainGitHub ๋ฆฌํฌ โ Settings โ Secrets and variables โ Actions:
| Secret | ์ค๋ช |
|---|---|
GROQ_API_KEY |
Groq API ํค |
EMAIL_FROM |
Gmail ๋ฐ์ ์ฃผ์ |
EMAIL_APP_PASSWORD |
Gmail ์ฑ ๋น๋ฐ๋ฒํธ |
EMAIL_TEST_TO |
ํ ์คํธ ์์ ์ฃผ์ |
-
ํธ๋ฆฌ๊ฑฐ:
workflow_dispatch(์๋ ๋๋ cronjob.io) -
์
๋ ฅ:
test_mode(boolean) โ ํ ์คํธ ์์ ์์๊ฒ๋ง ๋ฐ์ก -
๋จ๊ณ:
- ๋ณด์ ์ค์บ (ํ๋์ฝ๋ฉ ์ํฌ๋ฆฟ ๊ฒ์ฌ)
- ์บ์ ๋ณต์
- ํ์ดํ๋ผ์ธ ์คํ
- ์บ์ ์ ์ฅ
-
ํธ๋ฆฌ๊ฑฐ:
repository_dispatch(Cloudflare Worker์์) ๋๋workflow_dispatch(์๋) - ์ ๋ ฅ: action (add/remove/update), email, language, topics
- ๋์: subscribers.json ์์ โ ํ์ ์ด๋ฉ์ผ ๋ฐ์ก โ ์ปค๋ฐ+ํธ์
๋งค์ผ KST 10:15์ ์๋ ์คํํ๋ ค๋ฉด:
- cronjob.io ๊ฐ์
- ์ cronjob ์์ฑ
- URL:
https://api.github.com/repos/minjungsung/hackdigest/actions/workflows/daily-digest.yml/dispatches - Method: POST
- Headers:
Authorization: Bearer {GITHUB_PAT},Accept: application/vnd.github+json - Body:
{"ref":"main","inputs":{"test_mode":"false"}} - Schedule:
15 1 * * *(UTC 01:15 = KST 10:15)
cd worker
npm installnpx wrangler loginnpx wrangler deploynpx wrangler secret put GITHUB_TOKEN
# Fine-grained PAT with Contents:write for hackdigest reponame = "hackdigest-subscribe"
main = "src/index.js"
compatibility_date = "2024-01-01"docs/index.html์ GitHub Pages๋ก ์๋ ๋ฐฐํฌ๋ฉ๋๋ค.
์ค์ : Repository โ Settings โ Pages โ Source: Deploy from a branch โ Branch: main / /docs