Google Keep の `__Fashion` ラベル付きノート、Google Calendar の「0 ゆいせき コーデ」履歴、当日の天気を組み合わせてコーディネートを提案し、カレンダーへ記録する。ユーザーが「今日のコーデを提案して」「天気に合わせた服を選んで」「コーデをカレンダーに残して」と依頼したときに使う。
gkeep と gog を利用可能にする。.env から GOG_KEYRING_PASSWORD を読み込む。export $(grep -v '^#' /home/yuiseki/Workspaces/.env | xargs)
__Fashion ラベルの Keep ノートを取得して候補アイテムを整理する。gkeep notes ls --all --json | jq -r '.[] | select(.labels[]? == "__Fashion")'
CAL_ID=$(/home/yuiseki/bin/gog --account [email protected] calendar calendars --json | sed -n '/^{/,$p' | jq -r '.calendars[] | select(.summary=="0 ゆいせき コーデ") | .id')
/home/yuiseki/bin/gog --account [email protected] calendar events ls "$CAL_ID" --from <開始日> --to <終了日> --json
/home/yuiseki/bin/gog --account [email protected] calendar create "$CAL_ID" \
--summary "Keepノートタイトル1" \
--from "<当日日付>" --to "<当日日付>" --all-day --force
/home/yuiseki/bin/gog --account [email protected] calendar create "$CAL_ID" \
--summary "Keepノートタイトル2" \
--from "<当日日付>" --to "<当日日付>" --all-day --force