#api-client #client #api #tui #hungarian #kreta

bin+lib rsfilc

A Kréta API and client(cli and TUI: todo!) written entirely in Rust from the ground up

7 unstable releases (3 breaking)

new 0.5.8 Apr 29, 2024
0.5.0 Apr 18, 2024
0.4.2 Apr 14, 2024
0.3.2 Apr 12, 2024
0.2.0 Apr 9, 2024

#143 in Command-line interface

Download history 376/week @ 2024-04-08 175/week @ 2024-04-15

551 downloads per month

MIT license

89KB
2K SLoC

RsFilc: Kréta client in Rust

Kréta is an awful Hungarian electronic school administration system

Magyar leírás

Installation

  • Rust

  • cargo install --locked rsfilc

    for latest, beta builds: cargo install --locked --git "https://codeberg.org/jark/rsfilc"

Dependencies

optional

  • w3m: for enjoyable (html) message previews
  • lynx: for enjoyable (html) message previews

Shell completions:

Bash

Add this to the end of your config file (usually ~/.bashrc):

eval "$(rsfilc completions bash)"
Zsh

Add this to the end of your config file (usually ~/.zshrc):

eval "$(rsfilc completions zsh)"

For completions to work, the above line must be added after compcompletions is called. You may have to rebuild your completions cache by running rm ~/.zcompdump*; compcompletions.

Fish

Add this to the end of your config file (usually ~/.config/fish/config.fish):

rsfilc completions fish | source
PowerShell

Add this to the end of your config file (find it by running echo $profile in PowerShell):

Invoke-Expression (& { (rsfilc completions powershell | Out-String) })
Elvish

Add this to the end of your config file (usually ~/.elvish/rc.elv):

eval (rsfilc completions elvish | slurp)

Note RsFilc only supports elvish v0.18.0 and above.

Usage

rsfilc --help

Features

cross-platform: not tested thoroughly but should run on

  • linux
  • windows
  • macOS
  • android via Termux
  • everything else that Rust supports

API

  • Kréta API URL fetching (no clue what they do)

  • school fetching from ReFilc API

  • user info fetch (json)

    • token
    • basic information
    • evaluations/grades
    • timetable
    • messages
      • attachments
    • announced test
    • absences
  • usable user info (in structs)

    • token
    • basic information
    • evaluations/grades
    • timetable
    • messages
      • attachments
    • announced test
    • absences

CLI

  • basic usage of API
  • filtering what to show
  • multi-user feature
  • somehow rendering html that messages return
  • render html messages with w3m or lynx if possible
  • shell completions: [bash, zsh, fish, elvish, powershell]
  • logger: fern maybe
  • helpful crashes
  • caching everything so that life remains enjoyable
    • token
    • timetable
    • evals
    • user info
    • absences
    • announced tests
    • messages
  • encoding passwords
  • changing passwords

TUI

  • multiple pages

    • evaluations
    • timetable
    • ...
  • beautifully displaying data

    • timetable in nice table
    • plotting evaluations
    • ...

Acknowledgements

Dependencies

~7–22MB
~293K SLoC