Veeenz / OPIS-Manager

This tool performs the data visualization of the OPIS results

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OPIS-Manager

This tool performs the data visualization of the OPIS results. Live Demo

[TOC]

Requirements

Install AMP

This project to run need: PHP, MySQL, a webserver (like Apache2). This requirements are satisfied by the software stack *AMP:

  • LAMP for Linux
  • MAMP for Mac
  • XAMPP/WAMP/EasyPHP and similar for Windows

Linux

In a linux distro debian-based the package tasksel can install the meta-package LAMP easily, so install tasksel with:

$ sudo apt install tasksel
$ sudo tasksel

Select "LAMP" (use the key arrows and the keybutton "space" to select the option), press TAB and install LAMP.

Mac

Here the download link of MAMP. MAMP can be installed by hombrew

Windows

Download EasyPHP

Cross-platorm alternatives

Initialize Laravel backend

To install the Laravel API, run the setup_api.sh, it will change the permissions of some files inside the API directory and create the .env file.

$ sh setup_api.sh

Configure the database parameters opening the file API/.env

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=database_name
DB_USERNAME=username
DB_PASSWORD=password

Go to the API directory and use composer to download and install the dependencies:

$ cd API
$ composer install

Generate application key:

$ php artisan key:generate

Import the database structure

If you just installed *AMP and have no mysql database, create one with:

$ mysql -u root -p
> CREATE DATABASE db_name;
> exit;

Import the database schema using laravel migrations

$ php artisan migrate

Now your OPIS-Manager API is installed.


How to use the scrapers

The tools in the scrapers directory can extract the public OPIS data from the official site of the University of Catania.

These tools require PHP with mbstring, curl, dom, mysql and mysqli. On Ubuntu you can install them using:

sudo apt-get install php php-mbstring php-curl php-dom php-mysql php-mysqli

To use them go to scrapers, copy the file config.php.dist into config.php and configure it for the database mysql.

Well, run the main file dipartimento.php, it will extract the opis data and it will import them in the database. You can run it from the terminal with:

$ php dipartimento.php

Angular application (front-end)

To run the front-end application you just need to enter into opis-manager/ directory and install the required packages with:

$ cd opis-manager
$ npm install

Install the last version of angular-cli to run the app locally with:

$ npm install -g @angular/cli@latest

Configure the years and the API path, so copy src/assets/config.json.dist into src/assets/config.json and configure the related years and API url, like:

{
  "apiUrl": "http://localhost/OPIS-Manager/API/public/index.php/api/",
  "years": ["2013/2014", "2014/2015", "2016/2017", "2017/2018"]
}

Finally can run the front-end application with the follow command while you are in opis-manager/:

$ ng serve -o

Credits

  • Stefano Borzì (Helias)
  • Pierpaolo Pecoraio
  • Simone Scionti
  • Alessandro Catalano
  • Alessio Piazza
  • Diego Sinitò

About

This tool performs the data visualization of the OPIS results

License:GNU General Public License v3.0


Languages

Language:PHP 66.3%Language:TypeScript 17.8%Language:HTML 10.7%Language:CSS 1.8%Language:TSQL 1.7%Language:JavaScript 1.4%Language:Vue 0.2%Language:Shell 0.1%