Skip to content

hey2022/tls-xb

Repository files navigation

tls-xb

tls-xb is a cli tool that fetches scores and GPA from Tsinglan Xiaobao.

Features

  • Access weighted and unweighted GPA, even when hidden.
  • View detailed subject scores for all subjects.
  • View scores from previous semesters.
  • Color coded scores depending on performance.
  • Tabled output.
  • Tasks (-t, --tasks)
    • View task scores, even for unreleased tasks.
    • View proportion of each individual task.

Prerequisites

Install

Nix

Note

Uses development version of tls-xb.

Click to expand

Add this to your flake.nix

{
  inputs = {
    tls-xb = {
      url = "github:hey2022/tls-xb";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };
}

To install tls-xb to your NixOS/Home Manager configuration, add the following to your environment.systemPackages or home.packages respectively:

inputs.tls-xb.packages.${pkgs.stdenv.hostPlatform.system}.default

Install script

Windows

In the terminal, run:

powershell -ExecutionPolicy ByPass -c "irm https://github.com/hey2022/tls-xb/releases/latest/download/tls-xb-installer.ps1 | iex"

Linux & macOS

In the terminal, run:

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/hey2022/tls-xb/releases/latest/download/tls-xb-installer.sh | sh

From binaries

The release page contains precompiled binaries for:

From source

tls-xb is written in Rust, so the Rust toolchain will be needed to compile it.

cargo install tls-xb

# Git version
cargo install --git https://github.com/hey2022/tls-xb.git

Update

To update tls-xb simply reinstall a newer version.

Development

A development shell is provided with the nix project flake, to enter it run nix develop.

Usage

For help, run tls-xb -h.

  1. In your terminal, run tls-xb login to save your login details on your computer.
  2. Run tls-xb to run the program.

FAQ

Can this change my GPA?

No tls-xb only fetches data from https://tsinglanstudent.schoolis.cn/api to calculate your GPA, which does not expose an api to change your GPA.