Skip to content
View KJnews's full-sized avatar
🏫
🏫

Block or report KJnews

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
KJnews/README.md
KJ Logo

KJ NEWS

截取自天主教光仁高級中學官網,將最新消息傳送至 LINE Notify。


目錄

使用說明

請依照以下步驟將LINE_NOTIFY_IDGOOGLE_SHEETS_KEYGS_CREDENTIALS三個Secrets儲存在GitHub當中。
Fork → Create Fork → Settings → Secrets and variables → Actions → New repository secret
Actions → I understand my workflows, go ahead and enable them → Enable workflow

  1. LINE_NOTIFY_ID:如果有多個,可以用空格分開

    Steps:
    個人頁面 → 發行權杖

    Example:

    LINE_NOTIFY_ID_1 LINE_NOTIFY_ID_2
    
  1. GOOGLE_SHEETS_KEY:在https://docs.google.com/spreadsheets/d/後的一串金鑰

    Steps:
    建立副本 → 複製Google Sheets Key

    Example:

    1_3uoF27lQChsr7QYNk_V8FhvtkPFVRrkCKjFeJsutvY
    
  1. GS_CREDENTIALS:複製JSON當中所有的內容

    Steps:
    • 建立專案:選取專案 → 新增專案
    • 啟用 Google Sheets API:ENABLE APPS AND SERVICES → Google Sheets API → 啟用
    • 新增憑證:憑證 → 建立憑證 → 服務帳戶 → 繼續 → 完成(至Google Sheets共用此服務帳號)
    • 新增金鑰:點擊服務帳戶 → 新增金鑰 → 建立新的金鑰 → JSON

    Example:

    {
      "type": "service_account",
      "project_id": "PROJECT_ID",
      "private_key_id": "PRIVATE_KEY_ID",
      "private_key": "-----BEGIN PRIVATE KEY-----PRIVATE_KEY\n-----END PRIVATE KEY-----\n",
      "client_email": "CLIENT_EMAIL",
      "client_id": "CLIENT_ID",
      "auth_uri": "AUTH-URI",
      "token_uri": "TOKEN_URI",
      "auth_provider_x509_cert_url": "AUTH_PROVIDER_X509_CERT_URL",
      "client_x509_cert_url": "CLIENT_X509_CERT_URL"
    }
    

參考資料

以下是一些撰寫程式時參考的網站:

Pinned Loading

  1. KJnews KJnews Public

    截取自天主教光仁高級中學官網,將最新消息傳送至 LINE Notify。

    Python 1 1