You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+62-4Lines changed: 62 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,18 +24,73 @@ Please visit our [Discord](https://discord.utdnebula.com) and talk to us if you'
24
24
25
25
### Prerequisites
26
26
27
-
- Golang 1.23 (or higher)
27
+
- Golang 1.24 (or higher)
28
28
29
-
### Development
30
-
31
-
Documentation for the project will be created soon, but for more information please visit our [Discord](https://discord.com/invite/tcpcnfxmeQ).
29
+
### Build
32
30
33
31
To build the project, simply clone the repository and then either:
34
32
- Run `make` in the root (top level) directory (for systems with `make` installed, i.e. most Linux distros, MacOS)
35
33
- Run `build.bat` on Windows systems (unless you want to deal with getting `make` to work on Windows :P)
36
34
37
35
The build process will output an executable file named `api-tools`; this executable is the CLI and can be ran in your terminal!
38
36
37
+
Additionally, you can run build (on Windows) and make (on MacOS/Linux) with the following arguments:
38
+
-`setup`: Installs required dependencies for the tools.
39
+
-`check`: Verifies prequisites and ensures the executable can be built.
40
+
-`test`: Test run to see if the executable works after building
41
+
-`build`: Builds the executble and makes it ready for use.
42
+
43
+
### Usage
44
+
45
+
The `api-tools` command line interface supports three main modes: scraping, parsing and uploading data to the Nebula API.
46
+
47
+
#### Environment Variables
48
+
Before being able to use the tool, configure the `.env` file by following these steps:
49
+
1. Find the `.env.template` file and rename it to `.env`
50
+
2. Specify the required credentials for your use case as a string ("") following the variable name.
51
+
Example: LOGIN_NETID="ABC123456"
52
+
53
+
#### Basic Usage
54
+
55
+
Run the tool by changing directory using `cd` to the `api-tools` directory and running the executable with the appropriate flags in the command line. To see all available options with the tool, run: `./api-tools`. To enable logging for debugging, use the verbose flag: `./api-tools -verbose`. Find available flags for each mode in the following tables.
|`./api-tools -scrape -coursebook -term 24F`| Scrapes coursebook data for Fall 2024.<br>• Use `-resume` to continue from last prefix.<br>• Use `-startprefix [prefix]` to begin at a specific course prefix. |
|`./api-tools -upload -replace`| Replaces old data instead of merging. |
90
+
|`./api-tools -upload -static`| Uploads only static aggregations. |
91
+
92
+
Additionally, you can use the `-i [directory]` flag to specify where to read data from (default: `./data`) and the `-l [directory]` flag to specify where logs must be dumped (default: `./logs`).
93
+
39
94
#### Docker
40
95
41
96
Docker is used for automated running on Google Cloud Platform. More info [here](https://nebula-labs.atlassian.net/wiki/x/AYBjFw).
@@ -45,3 +100,6 @@ To build the container for local testing first make sure all scripts in the `run
45
100
docker build --target dev -t my-runner:local .
46
101
docker run --rm -e ENVIRONMENT=dev -e RUNNER_SCRIPT_NAME=daily.sh my-runner:local
47
102
```
103
+
104
+
## Questions?
105
+
Reach out to the team on [Discord](https://discord.utdnebula.com) and with any questions you may have!
0 commit comments