Skip to content

skywalker0823/wikiwaku

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Greps wikipedia history of today and NASA APOD every morning(with chatGPT API translated), and broadcast to Line messenger.

Hosted on Google Cloud Platform with fully automated CI/CD pipeline

2023/09/22 更新: 由於 Line 把免費訊息額度500調整至200,這裡之後將會切換到Telegram,並且計劃加入其他功能,讓每日推薦更加有趣。

截圖 2023-05-23 上午11 34 26 IMG_3558 IMG_3557

Tech Stack

  • 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

APIs

  • Wikipedia API
  • Line Messaging API
  • OpenAI text-devinci-003 for translation

這個project的目的是要抓取wikipedia的歷史上的今天與Nasa每日一圖,並且每日固定發送到 Line 上

  1. Code commit 到 Github
  2. 觸發 Cloud Build
  3. CloudBuild 部署到 CLoud Function (Gen-2, 底層是 Cloud Run)
  4. Cloud Scheduler 每天 09:00 觸發 Cloud Pub/Sub
  5. Cloud Pub/Sub 觸發 Cloud Function
    1. 抓取歷史上的今天(可以指定zh, en, ja 等語言)
    1. 抓Nasa每日一圖
    1. 把Nasa原文資料藉由OpenAI API翻譯成中文
    1. 把以上資料整理成Line的格式 then GO~

未來功能

  • 提升互動性(webhook), 星座 或是每日推薦, 山岳資料, 串接公開平台api
  • chatGPT 基本功能

About

Your daily wiki history of today report.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages