This program is a school project for processing and analyzing water data.
Clone the repository and make the launcher executable:
git clone https://github.com/TogExe/waterProject
cd waterProject
chmod +x script/wildwaterlauncher.shAdd wildwaterlauncher to your commands
sudo ln -s ~/waterProject/script/wildwaterlauncher.sh /usr/local/bin/wildwaterlauncherRemove wildwaterlauncher
sudo rm /usr/local/bin/wildwaterlauncher./script/wildwaterlauncher.sh
Running the launcher without arguments will display available commands and options.
Available options:
--debug: Enable debug mode--fast: Run faster without security checks (deprecated)--rsc: Use a new cache--make: Compile the program
The program provides two main commands: histo and leaks.
Create a histogram of factory data:
./script/wildwaterlauncher.sh [DATAFILE] histo [max|src|real]max: Maximum capacity of factories (M.m³)src: Volume factories can receive from sourcesreal: Actual volume received (Volume minus leaks)
Output:
-
A data file with factory IDs and selected data
-
Two histograms:
- 50 smallest factories (by maximum capacity)
- 10 largest factories
Display water lost from a specific factory:
./script/wildwaterlauncher.sh [DATAFILE] leaks "NAME #ID"- If the factory does not exist, it returns
-1. - Updates or creates a file with yield history.
./script/wildwaterlauncher.sh data.csv histo real
./script/wildwaterlauncher.sh data.csv leaks "Factory #123"