This npm add, edit, delete or display your events in Google Calendar on terminal.
npm install googler-js
Login GCP > [APIs & Services] > [Enabled APIs & services]
https://cloud.google.com/endpoints/docs/openapi/enable-api
[APIs & Services] > [OAuth consent screen]
https://support.google.com/workspacemigrate/answer/9222992?hl=ja
[APIs & Services] > [Credentials] > [CREATE CREDENTIALS] > [Service account]
And then download credential json file.
https://cloud.google.com/docs/authentication/production?hl=ja#create_service_account
Select calendar you want to share to the service account, add people in [Share with specific people].
And then enter the email address of service account and select permissions (choice [Make changes to events]).
Copy env file.
cp .env.sample .env
Set environmental variables.
export CREDENTIAL_KEY_FILE='~/service_credentials.json' # your credential file path
export CALENDAR_ID='xxxxx' # your calendar id
export TIMEZONE='Asia/Tokyo' # your timezone
Execute source command.
source .env
Execute googler-js
command with the below option.
$ googler-js -h
Usage: cli [options]
Options:
-l, --list list your calendar
-a, --add add a new schedule
-d, --delete delete a schedule
-e, --edit edit a schedule
-h, --help display help for command