Google Apps Scriptで、Google Calendarの予定をカウントしGoogle SpreadSheetに書き込んだ上で、予定のラベル(色)毎に工数合計を計算するスクリプトです。
以下のソフトウェアの使用を前提とします。
- Node.js:v20以降
- TypeScript:v5以降
また、GASを実行するためのGoogleアカウントが必要です。
- リポジトリをクローンし、ディレクトリを移動
git clone https://github.com/tsukuboshi/gas-count-schedule-time.git
cd gas-count-schedule-time
- npmパッケージをインストール
npm init -y
npm install
- asideを初期化しGASプロジェクトを作成
- Project Title:(任意のプロジェクト名)
license-header.txt
の上書き:Norollup.config.mjs
の上書き:No- Script ID:空文字
- Script ID for production environment:空文字
npx @google/aside init
✔ Project Title: … gas-count-schedule-time
✔ Adding scripts...
✔ Saving package.json...
✔ Installing dependencies...
license-header.txt already exists
✔ Overwrite … No
rollup.config.mjs already exists
✔ Overwrite … No
✔ Script ID (optional): …
✔ Script ID for production environment (optional): …
✔ Creating gas-count-schedule-time...
-> Google Sheets Link: https://drive.google.com/open?id=xxx
-> Apps Script Link: https://script.google.com/d/xxx/edit
- GASアプリをデプロイ
npm run deploy