mirror of
https://codeberg.org/flpolyaplus/aplus.git
synced 2024-11-21 08:50:30 -05:00
update readme to the current status of the project
This commit is contained in:
parent
102a3ef5f3
commit
9221051dae
41
README.md
41
README.md
@ -1,11 +1,39 @@
|
||||
# aplus command line utility
|
||||
# A+Attendance CLI
|
||||
|
||||
This is an cli utility initially created for students at Florida Polytechnic University to submit their aplus codes.
|
||||
In time, we intend to generalize this utility to all universities.
|
||||
In the meantime however, any students from other universities wishing to use the utility may change the instance_url (the main URL you see before the / when you use Canvas) variables.
|
||||
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`
|
||||
|
||||
@ -15,6 +43,11 @@ In the meantime however, any students from other universities wishing to use the
|
||||
### 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/)
|
||||
|
||||
|
@ -14,7 +14,7 @@ import (
|
||||
)
|
||||
|
||||
func initialize() {
|
||||
instance_url := "https://floridapolytechnic.instructure.com"
|
||||
instance_url := os.Getenv("CANVAS_INSTANCE")
|
||||
base_link = instance_url + "/api/v1"
|
||||
token = os.Getenv("CANVAS_API_KEY")
|
||||
jar, _ := cookiejar.New(&cookiejar.Options{
|
||||
|
2
main.go
2
main.go
@ -24,7 +24,7 @@ func usage() {
|
||||
fmt.Println(" -t, --timetable\tlists the class sessions in a course")
|
||||
fmt.Println(" -v, --verbose\tprints with verbose output")
|
||||
fmt.Println(" -h, --help\tdisplays this help message")
|
||||
fmt.Println(" -p, --profile\twrites cpu profile to a file")
|
||||
fmt.Println(" -p, --profile\twrites cpu profile to a file (for debugging/optimizing)")
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
Loading…
Reference in New Issue
Block a user