Skip to content

A command line application written in Rust that retrieves a schedule from Zermelo.

License

Notifications You must be signed in to change notification settings

splintersuidman/cli-for-zermelo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cli-for-zermelo Build Status

Installation

Install Rust. Then run the following in your terminal:

git clone https://github.com/splintah/cli-for-zermelo.git
cd cli-for-zermelo
cargo build --release

The executable is now located in target/release/. You may want to move this executable into a folder in your path.

Usage

There are two ways to use this program:

  • With a config file: Config.

  • Without a config file, with command line flags: Flags.

The recommended way is to use a config file.

Config

Create a config toml file somewhere, for example: $HOME/.cli-for-zermelo.toml (you don’t have to specify the filetype, but it may be convenient for possible syntax highlighting). This file will contain your settings for this program.

When you first want to authenticate, write the following in your config file, replacing your school and authentication code to the values found in the Zermelo Portal (Koppelingen → Koppel App):

school = "your-school"

[temp]
auth_code = "123 456 689 012"

Now run the program with the flag --config [your-config], replacing "[your-config]" with the path to your config file. This will get an access token, and it automatically sets it in your config file. Your config file will look something like the following now:

school = "your-school"
access_token = "abcdefghijklmnopqrstuvwxyz"

When you want to run the program again, run it with the flag --config [your-config] again. You may want to set an alias to this.

Flags

This explanation of flags can also be obtained by passing the flag --help.

cli-for-zermelo 0.2.0
Splinter Suidman
A command line application that shows you your schedule from Zermelo.
USAGE:
    zermelo [FLAGS] [OPTIONS]
FLAGS:
        --help              Prints help information
    -h, --hide_cancelled    Do not display cancelled appointments.
    -i, --show_invalid      Show invalid appointments. These will be displayed in red.
    -t, --tomorrow          Display tomorrow's schedule.
    -V, --version           Prints version information
    -y, --yesterday         Display yesterday's schedule.
OPTIONS:
    -a, --access_token <access token>    The access token retrieved with your authentication code.
    -u, --auth <authentication code>     Authenticate with your code found in the Zermelo Portal (Koppelingen -> Koppel
                                         App). School has to be set.
    -c, --config <config file>           The location of the config file.
    -f, --future <future day>            Display schedule from n days in the future.
    -p, --past <past day>                Display schedule from n days in the past.
    -s, --school <school>                The school identifier found in the Zermelo Portal (Koppelingen -> Koppel App).

Disclaimer

This program is not affiliated with Zermelo Software B.V. It only uses its API for retrieving a schedule.

About

A command line application written in Rust that retrieves a schedule from Zermelo.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages