An open API service indexing awesome lists of open source software.

https://github.com/terakoya76/google-calendar-duplicator


https://github.com/terakoya76/google-calendar-duplicator

google-apps-script google-calendar

Last synced: 4 months ago
JSON representation

Awesome Lists containing this project

README

          

# google-calendar-duplicator

Google Calendar Duplicator is a Google Apps Script (GAS) application that synchronizes calendar availability between multiple Google Calendars while preserving privacy.

Instead of copying actual event details, it creates placeholder events (e.g., "Absence") that only show time slots, allowing users to indicate busy times without revealing meeting specifics.

Use Cases
1. Cross-account synchronization: Sync busy times between personal and work Google accounts
2. Calendar aggregation: Combine multiple source calendars into a single "availability" calendar

## Usage

### Install deps

```sh
mise install
pnpm install
```

### Deploy

```sh
clasp login

# The credential is saved into ~/.clasprc.json
mv ~/.clasprc{,-hoge}.json

# Create GAS manually on the google account.
# Then, update scriptId and repository location
cp .clasp-template.json ./config/.clasp-hoge.json
vim ./config/.clasp-hoge.json

# deploy
clasp push -P ./config/.clasp-hoge.json -A ~/.clasprc-hoge.json -I ./.claspignore
```

### Script Properties

You need to configure the following Script Properties in GAS.
1. Open your project in [Google Apps Script](https://script.google.com/)
2. Click `Project Settings` in the left menu
3. In the `Script Properties` section, click `Add script property`

Required Properties

| Property | Description |
|----------|-------------|
| `SYNC_CONFIG` | JSON configuration for calendar sync |

```sh
jq . -c < mise.local.toml
[tasks.deploy]
description = "Deploy to all Google Apps Script projects"
depends = ["deploy-account-1", "deploy-account-2"]

[tasks.deploy-account-1]
description = "Deploy to account-1 Google Apps Script project"
run = "clasp push -P ./config/.clasp-account-1.json -A ~/.clasprc-account-1.json -I ./.claspignore"

[tasks.deploy-account-2]
description = "Deploy to account-2 Google Apps Script project"
run = "clasp push -P ./config/.clasp-account-2.json -A ~/.clasprc-account-2.json -I ./.claspignore"
EOF

mise run deploy
```