Simple and easy to use python API for the COVID registration booking system of the math department @ unipd (torre archimede)

Overview

Minimal API for the COVID Booking System of the Offices at the UniPD Math Dep

Currently for registering the presence at the math department you have to manually login into the math website and fill several forms EVERY day. In order to speedup this process, this project proposes a minimal interface of the COVID booking system of the math unipd website that you can use the simple API written in Python.

If you use the code of this repo and you find this project useful, please consider to give a star ⭐!

Requirements

  • You have to clone the repo:
# clone the repo
git clone https://github.com/guglielmocamporese/math-unipd-booking.git

# go the project folder
cd math-unipd-booking
  • You have to use Python 3.x (specifially I used Python 3.7, but 3.x should be ok),
  • You need the selenium package (this is a python package for interacting with web pages):
# install selenium
pip install selenium
  • You have to have Chrome (for now the code supports only this web browser),
  • You have to download chromedriver form [here] (search for the version compatible with your Chrome version), and move the extracted file into the project folder math-unipd-booking,
  • Extend the permissions for the bash scripts:
# extend files permissions
chmod +x ./book ./check ./remove

Example of Usage

# Book the office
./book # book the office 732 from 9:00 to 18:00, today
./book --office 702 --tomorrow # book the office 702 from 9:00 to 18:00, tomorrow
./book --next_week -ta 10 -td 19 # book the office 732 from 10:00 to 19:00, all the next week
./book --this_month # book the office 732 from 9:00 to 18:00, all this month

# Check reservations
./check --this_month # check all my reservations of this month in office 732

# Remove reservations
./remove --this_week # remove all my reservations of this week in office 732

Here all the input arguments that are supported:

  -h, --help            show this help message and exit
  --mode {book,check,remove}
                        Year of the booking.
  --year {2020,2021,2022}, -y {2020,2021,2022}
                        Year of the booking.
  --month {1,2,3,4,5,6,7,8,9,10,11,12}, -m {1,2,3,4,5,6,7,8,9,10,11,12}
                        Month number of the booking.
  --day DAY, -d DAY     Day of the booking.
  --arrival {7,8,9,10,11,12,13,14,15,16,17,18}, -ta {7,8,9,10,11,12,13,14,15,16,17,18}
                        Time of arrival (h) of the booking.
  --departure {8,9,10,11,12,13,14,15,16,17,18,19}, -td {8,9,10,11,12,13,14,15,16,17,18,19}
                        Time of departure (h) of the booking.
  --office OFFICE, -o OFFICE
                        Office number.
  --guests GUESTS, -g GUESTS
                        Guests names (optional).
  --today               Use today as the time reference.
  --tomorrow            Use tomorrow as the time reference.
  --this_week           Use this week as the time reference.
  --next_week           Use next week as the time reference.
  --this_month          Use this month as the time reference.
  --next_month          Use next month as the time reference.

TODO

  • Write a Telegram bot for this project,
  • Extend the code on different web browser other than Chrome,
  • Add functionalities (booking statistics, ...)
Owner
Guglielmo Camporese
PhD Student in Brain, Mind and Computer Science and Applied Scientist Intern at Amazon. Machine Learning for Videos, Images and Audio Speech contexts.
Guglielmo Camporese
Workshop OOP - Workshop OOP - Discover object-oriented programming

About: This is an open-source bot, the code is open for anyone to see, fork and

Francis Clairicia-Rose-Claire-Joséphine 5 May 02, 2022
Random Programming Language Project

Crastle Random Programming Language Project Freedom of expression Are you a fan of curly brace languages? Then use curly braces! Not a fan of curly br

DevNugget 2 Dec 23, 2021
This project recreates the R-based RCy3 Cytoscape Automation library as a Python package.

Python library for calling Cytoscape Automation via CyREST

Cytoscape Consortium 40 Dec 22, 2022
Backend/API for the Mumble.dev, an open source social media application.

Welcome to the Mumble Api Repository Getting Started If you are trying to use this project for the first time, you can get up and running by following

Dennis Ivy 189 Dec 27, 2022
Simply create JIRA releases based on your github releases

Simply create JIRA releases based on your github releases

8 Jun 17, 2022
A 3D Slicer Extension to view data from the flywheel heirarchy

flywheel-connect A 3D Slicer Extension to view, select, and download images from a Flywheel instance to 3D Slicer and storing Slicer outputs back to F

4 Nov 05, 2022
Aoc 2021 kedro playground with python

AOC 2021 Overview This is your new Kedro project, which was generated using Kedro 0.17.5. Take a look at the Kedro documentation to get started. Rules

1 Dec 20, 2021
Lock a program and kills it indefinitely if it is started.

Kill By Lock Lock a program and kills it indefinitely if it is started. How start it? It' simple, you just have to double-click on the python file (.p

1 Jan 12, 2022
This repository contains each day of Advent of Code 2021 that I've done.

Advent of Code - 2021 I will use this repository as my Advent of Code1 (AoC) repo for the 2021 challenge. I'm changing how I am tackling the problems

Brett Chapin 2 Jan 12, 2022
Tool that adds githuh profile views to ur acc

Tool that adds githuh profile views to ur acc

Lamp 2 Nov 28, 2021
A python library with various gambling and gaming classes

gamble is a simple library that implements a collection of some common gambling-related classes Features die, dice, d-notation cards, decks, hands pok

Jacobi Petrucciani 16 May 24, 2022
A Python script made for the Python Discord Pixels event.

Python Discord Pixels A Python script made for the Python Discord Pixels event. Usage Create an image.png RGBA image with your pattern. Transparent pi

Stanisław Jelnicki 4 Mar 23, 2022
100 Days of Python Programming

100 days of Python Following the initiative of my friend Helber Belmiro, who is almost done with his 100 days of Java, I have decided to start my 100

Henrique Pereira 19 Nov 08, 2021
Skip spotify ads by automatically restarting application when ad comes

SpotiByeAds No one likes interruptions! Don't you hate it when you're listening to your favorite jazz track or your EDM playlist and an ad for Old Spi

Partho 287 Dec 29, 2022
Visualize Data From Stray Scanner https://keke.dev/blog/2021/03/10/Stray-Scanner.html

StrayVisualizer A set of scripts to work with data collected using Stray Scanner. Usage Installing Dependencies Install dependencies with pip -r requi

Kenneth Blomqvist 45 Dec 30, 2022
Simple Python script I use to manage and build my Reflux themes.

Simple Python script I use to manage and build my Reflux themes. Built for personal use, but anyone can easily fork and tweak to suit thier needs.

Ire 3 Jan 25, 2022
:art: Diagram as Code for prototyping cloud system architectures

Diagrams Diagram as Code. Diagrams lets you draw the cloud system architecture in Python code. It was born for prototyping a new system architecture d

MinJae Kwon 27.5k Jan 04, 2023
Open slidebook .sldy files in Python

Work in progress slidebook-python Open slidebook .sldy files in Python To install slidebook-python requires Python = 3.9 pip install slidebook-python

The Institute of Cancer Research 2 May 04, 2022
Viewer for NFO files

NFO Viewer NFO Viewer is a simple viewer for NFO files, which are "ASCII" art in the CP437 codepage. The advantages of using NFO Viewer instead of a t

Osmo Salomaa 114 Dec 29, 2022
Research using python - Guide for development of research code (using Anaconda Python)

Guide for development of research code (using Anaconda Python) TL;DR: One time s

Ziv Yaniv 1 Feb 01, 2022