Skip to content

Instantly share code, notes, and snippets.

View tawachan's full-sized avatar
📝
大学院修士課程修了しました

tawachan tawachan

📝
大学院修士課程修了しました
View GitHub Profile
@tawachan
tawachan / update-ogp-data.js
Created September 19, 2023 15:02
OGPデータの更新スクリプト
const fs = require("fs");
const axios = require("axios");
const cheerio = require("cheerio");
const getExistingData = () => {
const existingData = JSON.parse(
fs.readFileSync("./static/ogp-data.json", "utf8")
);
return existingData;
};
@tawachan
tawachan / rich-link.tsx
Last active September 19, 2023 15:03
リッチリンクの独自コンポーネント
function main() {
// 検索条件を設定
const searchConditions = [
"has:attachment", // 添付ファイルがある
"to:your_group_email@example.com" // 特定の宛先に送られた
];
const searchQuery = searchConditions.join(" ");
const searchResults = GmailApp.search(searchQuery);
const messages = GmailApp.getMessagesForThreads(searchResults);