Categorygithub.com/mattismoel/lectigo
modulepackage
0.0.0-20231106181731-cf79f49c5c3d
Repository: https://github.com/mattismoel/lectigo.git
Documentation: pkg.go.dev

# README

What is this?

This project is a web scraper for the Danish gymnasium site Lectio by MaCom A/S. With this, you are able to extract the schedule from the main site and have it sync with your Google Calendar.

How to use

Clone the repository to a desired location

$ git clone "https://github.com/mattismoel/go-lectio-scraper.git

Golang Project

Tidy the project

$ go mod tidy

To build the project binary for MacOS, Windows and Linux, run the following command:

$ make build

This exports the binaries to the bin directory.

Usage

The project can be run either by the executable (with make run or direct call on the executable in the bin directory) or the go run command. Generally, the executable will be faster.

Examples

Syncing Lectio schedule with Google Calendar with modules for the next three weeks:

$ lego sync -u username1234 -p password1234 -s 133 -c [email protected] -w 3

Clearing all Lectio modules from Google Calendar

Note: This DOES NOT delete normal events from your calendar. Only Lectio modules are targeted.

$ lego clear -c [email protected]

Google OAuth authentication

This project makes use of the Google Calendar API, and therefore needs you to log in with your Google Account. When the application is run for the first time, a link will appear for you to log in. Click this link and enter confirm that Lectigo can modify your Google Calendar. When confirmed the syncing process should start automagically.

Google Calendar ID

The list of calendars that you own can be found at Google Calendar API's documentation CalendarList:list(). In the sidebar, you should see an Execute button. The resulting JSON is a list of your Google calendars. Find the desired calendar, copy the value of "id" and paste it into the googleSecrets.json file. Everything should be ready to go.

# Packages

Copyright © 2023 Mattis Kristensen <[email protected]> */.
No description provided by the author
No description provided by the author