Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

移植下載Sponsor圖片 #13

Merged
merged 6 commits into from
May 25, 2024
Merged

Conversation

Spyup
Copy link

@Spyup Spyup commented Apr 3, 2024

@Spyup Spyup linked an issue Apr 3, 2024 that may be closed by this pull request
@Spyup
Copy link
Author

Spyup commented Apr 3, 2024

更動:

  • 移植從 Google Sheet 下載 Sponsor 圖片 2023-static
  • 建立 Workflow

作用:手動驅動 Workflow 下載 Sponsor 圖片

待研究:自動更新

@mirumodapon mirumodapon self-requested a review April 8, 2024 13:44

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感覺這個要寫進 Deploy.yml?

import { google, sheets_v4 } from 'googleapis'
import { mkdir, writeFile } from 'fs/promises'
import * as path from 'path'
import get from 'lodash/get'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

這個依賴好像是錯的
現在專案裡的 lodash 是 lodash_es

const sheets = google.sheets('v4')
try {
const sheetsData = await sheets.spreadsheets.get({
key: process.env.SPREADSHEET_API_KEY,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

這裡的 key 沒有導入,所以會吃不到 key

@@ -54,7 +56,6 @@
"devDependencies": {
"@faker-js/faker": "^7.6.0",
"@iconify/json": "^2.2.52",
"@types/google-spreadsheet": "^3.3.1",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

這個為什麼要刪掉呀

@mirumodapon mirumodapon merged commit afe27bd into master May 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

重構抓取 sheet 資料的 script
2 participants