For help with the deployment see Deploy to Google Cloud Platform (GCP) section
Table of Contents
PJAIT's schedule page allows only to download the schedule in iCal format, but doesn't offer periodical syncing and integration with calendar apps. This project aims to solve this by creating a simple proxy that stands between the calendar apps and the PJAIT's page.
It logs you in, downloads the schedule in iCal format, fixes the format (as the exported file doesn't confront to iCal's specification hence eg. Apple Calendar on the iPhone doesn't want to sync it) as well as the issue with offsetted events in the day the time changes.
- Log in to your Google Account
- Go to https://console.cloud.google.com/projectcreate to create a project (You can leave all of the settings default)
- Set up billing account on GCP https://console.cloud.google.com/billing/create
IMPORTANT! The GCP has a free tier for the Cloud Run functions which we'll be using. This application will definitely not exceed this tier.
NOTE: This software and guide are provided "as is", without warranty of any kind. - Click on the button below and follow the instructions. This process can take up to a few minutes.
-
Add the calendar subscription to your calendar app of choice. The url for the subscription will be presented in GCP as
[ ✓ ] Your application is now live here: https://pjatk-ical-sync-abcdefghi.a.run.app
- Apple Calendar: support.apple.com
- Google Calendar, Use a link to add a public calendar section: support.google.com
- Outlook, Subscribe to a calendar section: support.microsoft.com
For additional options to this endpoint please see the Options section
This project is fully dockerized and can be deployed in the matter of minutes. The Docker section describes how to do it.
Alternatively you can run the whole app on the host. This is described in the Host section.
Name | Earliest tested version |
---|---|
Docker | 20.0 |
- Create a
.env
file in the following format
USERNAME="USERNAME" # Your PJAIT username (sXXXXX)
PASSWORD="PASSWORD" # Your PJAIT password
CALENDAR_PASSWORD="CALENDAR_PASSWORD" # Password for the subscription endpoint. Set only if you want to have it
-
Duplicate and rename
docker-compose.local.yml
todocker-compose.yml
and adjust it to your needs. -
Run
docker-compose up
(please note that the app has to be constantly running and be available for the sync to be working) -
Add the calendar subscription to your calendar app of choice. The url for the subscription is
http://localhost:3000
. For additional options to this endpoint please see the Options section- Apple Calendar: support.apple.com
- Google Calendar, Use a link to add a public calendar section: support.google.com
- Outlook, Subscribe to a calendar section: support.microsoft.com
For additional options to this endpoint please see the Options section
Name | Earliest tested version |
---|---|
Node | 16.14.0 |
Yarn | 1.22.17 |
- Install the npm dependencies
yarn install
- Create a
.env
file in the following format
USERNAME="USERNAME" # Your PJAIT username (sXXXXX)
PASSWORD="PASSWORD" # Your PJAIT password
CALENDAR_PASSWORD="CALENDAR_PASSWORD" # Password for the subscription endpoint. Set only if you want to have it
- Build the app using
yarn build
- Start the app using
yarn start
- Add the calendar subscription to your calendar app of choice. The url for the subscription is
http://localhost:3000
. For additional options to this endpoint please see the Options section.- Apple Calendar: support.apple.com
- Google Calendar, Use a link to add a public calendar section: support.google.com
- Outlook, Subscribe to a calendar section: support.microsoft.com
The subscription endpoint accepts the following query parameters (so you can call the endpoint with eg. http://localhost:3000/?password=CALENDAR_PASSWORD&from=2020-01-01
)
Option | Description | Type | Default value |
---|---|---|---|
from | Specifies the start date from which the data from PJAIT schedule page will be downloaded. | Date string in format YYYY-MM-DD | One year back |
to | Specifies the end date to which the data from PJAIT schedule page will be downloaded. | Date string in format YYYY-MM-DD | One year forward |
password | Used when CALENDAR_PASSWORD variable is set. Needed for authentication to the endpoint. |
String | Empty |
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
The project is build using TypeScript hence needs the transpilation to JavaScript to be able to be run using Node.js. The yarn dev
command runs the esbuild
in a watch mode and starts the app with node
using nodemon
which provides automatic restarts when the files change.
Distributed under the MIT License. See LICENSE.md
for more information.
Bartek Legięć - @bibix1999 - legiec.io
Project Link: https://github.com/bibixx/pjatk-ical-sync