Greps wikipedia history of today and NASA APOD every morning(with chatGPT API translated), and broadcast to Line messenger.
2023/09/22 更新: 由於 Line 把免費訊息額度500調整至200,這裡之後將會切換到Telegram,並且計劃加入其他功能,讓每日推薦更加有趣。
- Python
- Cloud Build
- CICD
- Cloud Scheduler
- Used to schedule the task, activate pub/sub every day at 09:00
- Cloud Functions
- Use gen-2, and the underlying is Cloud Run
- Cloud Pub/Sub
- Used to trigger cloud function
- Cloud Secret Manager
- Used to store the line and wikipedia token
- Line webhook and Other APIs
- Wikipedia API
- Line Messaging API
- OpenAI text-devinci-003 for translation
這個project的目的是要抓取wikipedia的歷史上的今天與Nasa每日一圖,並且每日固定發送到 Line 上
- Code commit 到 Github
- 觸發 Cloud Build
- CloudBuild 部署到 CLoud Function (Gen-2, 底層是 Cloud Run)
- Cloud Scheduler 每天 09:00 觸發 Cloud Pub/Sub
- Cloud Pub/Sub 觸發 Cloud Function
-
- 抓取歷史上的今天(可以指定zh, en, ja 等語言)
-
- 抓Nasa每日一圖
-
- 把Nasa原文資料藉由OpenAI API翻譯成中文
-
- 把以上資料整理成Line的格式 then GO~
- 提升互動性(webhook), 星座 或是每日推薦, 山岳資料, 串接公開平台api
- chatGPT 基本功能