Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add calendar integration instructions #25

Merged
merged 8 commits into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading