aplus/README.md

55 lines
1.6 KiB
Markdown

# A+Attendance CLI
This is a CLI utility initially created for students at Florida Polytechnic University to submit their A+ attendance codes, but can be used for other
universities using Canvas and A+Attendance.
## Building/Installing
To compile this program, you need `go` installed as well as need to set two
environment variables in your shell's configuration file (like `~/.profile` or it's rc file) for your Canvas instance URL and your account's API key.
### Getting an API key
When logged into your university's Canvas site, go to Account -> Settings -> New Access Token -> (give any name or expiration date) -> store the Token somewhere.
### Setting the Environment Variables
In your shell's configuration file, add:
```sh
export CANVAS_INSTANCE="https://youruniversityhere.instructure.com"
export CANVAS_API_KEY="the_canvas_access_token_you_stored_somewhere"
# below not needed if go is already setup
export GOPATH=$HOME/.local/go
export GOBIN=$GOPATH/bin
export PATH=$PATH:$GOBIN
```
### Installing
Simply run `go install codeberg.org/flpolyaplus/aplus@latest`.
## Usage
### Show help message
`aplus --help`
### List all courses and canvas course codes
`aplus --list-all`
### List favorite courses and canvas course codes
`aplus --list-favorites`
### Enter code for a specified course
`aplus --code <code> --course <canvas_course_number>`
If no course is specified, the code is tried on all active courses.
### Show timetable for a specified course
`aplus --timetable --course <canvas_course_number>`
## Mirrors
[Codeberg](https://codeberg.org/flpolyaplus/aplus/)
[Gitea (vineetk)](https://gitea.vineetk.net/flpolyaplus/aplus/)