2025-03-08 03:34:04 +00:00
2025-03-08 03:34:04 +00:00
2025-03-08 03:34:04 +00:00
2025-03-13 22:56:47 +00:00
2025-03-13 22:53:43 +00:00

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

  1. Clone the repository:

    git clone https://github.com/FernandoJVideira/gisem-presencas.git
    cd gisem-presencas
    
  2. Install dependencies:

    go mod tidy
    
  3. Add your credentials to the utils.go file.

  4. (Optional) If you are using Chromium instead of Chrome you need to add this line to the main.go file:

    chromedp.ExecPath("path/to/chromium-browser"), // Specify the path to Chromium executable
    

    So 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

  • -w or -wait: Time to wait in between refreshes (default is 10 seconds).
  • -l or -log: Send the output to a file.
  • -m or -maxtime: Sets a maxmium time for the program to try set Attendance (default is -1 (forever)).
  • -r or -replace: Forces the program into replacing the existing saved password.
  • -v or -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.

S
Description
No description provided
Readme
42 KiB
Languages
Go 100%