Skip to content

Commit

Permalink
Merge pull request #25 from DefiantLabs/clemensgg/dev
Browse files Browse the repository at this point in the history
Add calendar integration instructions
  • Loading branch information
danbryan authored Sep 29, 2023
2 parents 1819705 + f79491b commit b595fed
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 4 deletions.
60 changes: 60 additions & 0 deletions integrations/google-calendar-automation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Apps Script Setup for automated Cosmos Upgrades in Google Calendar 📅

Seamlessly integrate the `cosmos-upgrades` into your Google Calendar using Google Apps Script. This guide walks you through setting up the script.

## Features 🚀

- Directly pulls upgrade events from the `cosmos-upgrades` API.
- Automatically creates Google Calendar events for each discovered upgrade.
- Supports all calendar types (private, shared, public)
- Automatically updates calendar events every `15min`
- Requires minimal setup and runs on Google's infrastructure.

## Prerequisites 📜

1. A Google account.

## Setup Guide 🛠️

### 1. Fork the Script

- Navigate to the Google Apps Script project page: **[Google Script Project](https://script.google.com/home/projects/1IU3doZX1iY20JJ_DbwRNOwuufWIrLCqgFauwTsfp3d9jyxPYTViTXBte)**
- On the project overview page, hit the **Copy** button located at the top right.
- This creates your personal copy of the script and gives you full control and ownership, which is needed for the automatic update function to work!

![Fork the script](script_fork.png)

### 2. Deploy

- Inside the Google Apps Script editor, hit the **Deploy** button and choose **New Deployment**.
- In **Who has access to the app**, pick **Only myself**.
- For **Execute the app as**, choose **Me (your email)**.
- Press **Deploy**.

### 3. Call the web app & Authenticate

- Post-deployment, you're given a unique URL. Click to this URL to open it in your web browser.
- When calling the URL for the first time, you need to authenticate the Script to access your Google Calendar events and connect to external services.
- On the Sign-in page, click on "Advanced" > "Go to Copy of cosmos-upgrades (unsafe)" > "Allow"

![oauth](script_oauth.png)

You can now select your calendar(s), and which mainnets and testnets you want to receive updates for.

Hit the `Add cosmos-upgrades to calendar` button save your settings and add upgrade events from your network list.

![You're now set!](script_done.png)

## Disclaimer 💡

Though well-tested, this tool is experimental and relies on external Services and Google's infrastructure. Use it at your own risk!

If you encounter any problems or bugs please use this repository to open a new issue.

## License 📄

This guide and associated scripts are open-sourced under the MIT license. Modify, use, and share them!

---

Never miss a cosmos upgrade! 🎉
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions upgrades.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/bash

declare -A networks=(
[mainnets]="secretnetwork osmosis neutron nolus crescent akash cosmoshub sentinel stargaze omniflixhub cosmoshub terra kujira stride injective juno agoric evmos noble omny quasar dvpn onomy"
[testnets]="agorictestnet quasartestnet stridetestnet onomytestnet axelartestnet nibirutestnet nobletestnet dydxtestnet osmosistestnet cosmoshubtestnet"
[mainnets]="secretnetwork noble osmosis neutron nolus crescent akash cosmoshub sentinel stargaze omniflixhub cosmoshub terra kujira stride injective juno agoric evmos noble omny quasar dvpn onomy"
[testnets]="nobletestnet quasartestnet stridetestnet onomytestnet axelartestnet nibirutestnet nobletestnet dydxtestnet osmosistestnet cosmoshubtestnet"
)

# base_url="https://cosmos-upgrades.apis.defiantlabs.net"
base_url="http://localhost:5000"
base_url="https://cosmos-upgrades.apis.defiantlabs.net"
# base_url="http://localhost:5000"

# Loop over both mainnets and testnets
for type in "${!networks[@]}"; do
Expand Down

0 comments on commit b595fed

Please sign in to comment.