12 unstable releases (3 breaking)
new 0.4.1 | Jan 9, 2025 |
---|---|
0.4.0 | Dec 17, 2024 |
0.3.6 | Dec 10, 2024 |
0.3.5 | Sep 14, 2024 |
0.1.0 | Apr 21, 2024 |
#139 in Command-line interface
279 downloads per month
51KB
764 lines
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
-
tls-xb uses viuer to display the captcha, so a terminal supporting one of the supported graphics protocols is needed. Terminals supporting sixel be can found here.
Recommended terminals:
- Windows: Windows Terminal
- macOS: iTerm 2
- Linux: Kitty or WezTerm
Install
Nix
[!NOTE]
Uses development version of tls-xb.
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
The release page has instructions for running the install script.
From binaries
The release page contains precompiled binaries for:
- Windows
- macOS
- Linux
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
git clone https://github.com/hey2022/tls-xb.git
cd tls-xb
# Build
cargo build
# Run
cargo run
# Install
cargo install --path .
Usage
- In your terminal, run
tls-xb login
to save your login details on your computer. - 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.
Dependencies
~29–49MB
~826K SLoC