d7a9c847b05afd8de341741e60ff1b750e7ed1ba
IPLeiria Auto Attendance Script
This project automates the process of navigating to the IPLeiria GISEM platform and marking your attendence using the chromedp library.
Prerequisites
- Go 1.23.2 or later
- A Chromium browser installed
Installation
-
Clone the repository:
git clone https://github.com/FernandoJVideira/gisem-presencas.git cd gisem-presencas -
Install dependencies:
go mod tidy -
Add your credentials to the
utils.gofile. -
(Optional) If you are using Chromium instead of Chrome you need to add this line to the
main.gofile:chromedp.ExecPath("path/to/chromium-browser"), // Specify the path to Chromium executableSo the result would be (in
main.go):opts := append(chromedp.DefaultExecAllocatorOptions[:], chromedp.ExecPath("path/to/chromium-browser"), // Specify the path to Chromium executable chromedp.Flag("headless", headless), // Disable headless mode chromedp.Flag("disable-gpu", headless), // Enable GPU chromedp.Flag("start-maximized", !headless), // Start maximized )
Usage
To run the project without building it, execute the following command:
go run .
Building the Project
For your current OS
go build -o gisem_presencas
Cross-platform builds
For Windows
GOOS=windows GOARCH=amd64 go build -o gisem_presencas.exe
For macOS
GOOS=darwin GOARCH=amd64 go build -o gisem_presencas_mac
For Linux
GOOS=linux GOARCH=amd64 go build -o gisem_presencas_linux
And run it like:
./gisem_presencas -w value
On Windows:
gisem_presencas.exe -w value
Flags
-wor-wait: Time to wait in between refreshes (default is 10 seconds).-lor-log: Send the output to a file.-mor-maxtime: Sets a maxmium time for the program to try set Attendance (default is -1 (forever)).-ror-replace: Forces the program into replacing the existing saved password.-vor-verbose: Shows addicional info.
Project Structure
main.go: The main entry point of the application.utils.go: Contains utility functions such as flag parsing and the welcome message.go.mod: Go module dependencies.go.sum: Go module dependency checksums.README.md: Project documentation.
License
This project is licensed under the MIT License.
Languages
Go
100%