-
Frontend (React/ViteJS):
-
Backend: (newer is first)
- Go: this repo (WIP)
- C#: https://github.com/PoliNetworkOrg/GraduatorieScriptCSharp (stable)
- Py: https://github.com/PoliNetworkOrg/GraduatorieScript (deprecated)
Note
The following instructions should be stable, but if they are not working anymore, please open an issue.
There are 4 total commands (ATTOW):
scraper: perform scraping of rankings html files and school manifests against Polimi websiteparser: perform parsing of raw html files into custom data shapes, output as JSONplayground: for testing purpose only, especially useful when dealing with JSON encoding/decoding. Do not expect this package to last forever.migrate: made to convert oldhtmlfolder structure to the new one. See2b99e43,3f57469,9008f83commits for more details
The most common scenario is the following:
- Run scraper
go run ./cmd/scraper -d ../RankingsDati/data
- Run parser
go run ./cmd/parser -d ../RankingsDati/data
Important
If you don’t provide the -d (--data-dir) argument to either the scraper or parser commands, they will default to using the temporary folder ./tmp.
To understand why we are passing a data folder from another repository, check the C# README.
Note that for the purpose of using this script, it is possible to use a folder inside this project (e.g. ./data), but it is not recommended.
You can change the log level with the LOG_LEVEL env variable (debug/info/warn/error). Example:
LOG_LEVEL=error go run ./cmd/parser