CLI client for the Jagiellonian University's BaCa online judge

Overview

baca-cli Build codecov

CLI client for the Jagiellonian University's BaCa online judge

Preview

Installation

The latest release can be downloaded here.

  • Windows users can use convenient installer or download raw binary.
  • Linux and macOS users should rename binary to baca and copy it to ~/.local/bin or whatever your PATH is.
  • Cargo users can clone the repo, then install with command cargo install --path ..

Arch Linux

You can download the latest release from AUR and install it using your favourite AUR helper or directly from source:

sudo pacman -S base-devel git
git clone https://aur.archlinux.org/baca-cli.git
cd baca-cli
makepkg -sic

Usage

baca [FLAGS] [SUBCOMMAND]
FLAGS:
    -h, --help       Prints help information
    -v               Sets the level of verbosity
    -V, --version    Prints version information

SUBCOMMANDS:
    details    Gets submit details
    help       Prints this message or the help of the given subcommand(s)
    init       Initializes current directory as BaCa workspace
    log        Prints last (default 3) submits
    refresh    Refreshes session, use in case of cookie expiration
    submit     Submits file
    tasks      Prints available tasks

Workspace initialization: init

Initializes current directory as BaCa workspace, similar to git init. Currently, passwords are stored in plain text.

baca init --host <host>
-h, --host <host>            BaCa hostname, ex. mn2020
-l, --login <login>          BaCa login
-p, --password <password>    BaCa password

Example, running on Metody numeryczne 2019/2020 with no login prompt:

baca init --host mn2020 --login jaremko --password PaSsWorD

Re-login: refresh

Refreshes session, use in case of cookie expiration.

baca refresh

Submit: submit

Submit file to task given by its id. Use baca tasks to see what ids are available.
Passing optional parameter --zip will zip given file before submitting.
Currently a correct language string needs to be provided as well.

baca submit -t <task_id> -f <filename> [optional --zip]

Example:

> baca submit -f hello.cpp -t 5 -l "C++ z obsluga plikow"

Submitting hello.cpp to task [E] Metoda SOR (C++ with file support).

Saving task info

If you don't want to type task info (id and filename) every time you submit, you can use --default flag to save it. Keep in mind, that config provided though parameters will override saved data. To completely remove saved data use baca submit clear.

Example:

> baca submit -f hello.cpp -t 5 --default
Submitting hello.cpp to task [E] Metoda SOR.
> baca submit
Submitting hello.cpp to task [E] Metoda SOR.

Recent submits: log

Prints statuses of a couple of recent submits (default 3).

baca log [optional: number]

Example:

> baca log

● [G] Funkcje sklejane - C++ - 2020-05-17 18:53:09 - submit 4334
├─── 100% - 4 pts - Ok
└─── https://baca.ii.uj.edu.pl/mn2020/#SubmitDetails/4334

● [G] Funkcje sklejane - C++ - 2020-05-17 16:57:22 - submit 4328
├─── 100% - 4 pts - Ok
└─── https://baca.ii.uj.edu.pl/mn2020/#SubmitDetails/4328

● [G] Funkcje sklejane - C++ - 2020-05-17 16:53:41 - submit 4326
├─── 0% - 0 pts - WrongAnswer
└─── https://baca.ii.uj.edu.pl/mn2020/#SubmitDetails/4326

Submit details: details

Prints details of given submit. Requires initialized workspace.

baca details <id>

Example:

> baca details 4334

● [G] Funkcje sklejane - C++ - 2020-05-17 18:53:09 - submit 4334
├─── 100% - 4 pts - Ok
└─── https://baca.ii.uj.edu.pl/mn2020/#SubmitDetails/4334

All tasks: tasks

Prints all tasks.

baca tasks

Example:

> baca tasks

● 1 - [A] Zera funkcji - 69 OK
● 2 - [B] Metoda Newtona - 58 OK
● 3 - [C] FAD\x3Csup\x3E2\x3C/sup\x3E - Pochodne mieszane - 62 OK
● 4 - [D] Skalowany Gauss - 52 OK
● 5 - [E] Metoda SOR - 64 OK
● 6 - [F] Interpolacja - 63 OK
● 7 - [G] Funkcje sklejane - 59 OK
● 8 - A2 - 1 OK
● 9 - B2 - 2 OK
● 10 - C2 - 1 OK
● 11 - D2 - 2 OK
● 12 - E2 - 1 OK
● 13 - F2 - 3 OK
● 14 - G2 - 2 OK

Compilation

cargo build --release

Dependencies (Linux only)

sudo apt install pkg-config libssl-dev

Setting log levels

Log levels are configured by -v flag.

  • no flag - no additional logs
  • -v - info
  • -vv - debug
  • -vvv or more - trace
You might also like...
A Rust CLI tool that helps you enforce Git policies through Git hooks both server and client side

GitPolicyEnforcer This is a command line utility written in Rust, that helps you utilize Git hooks, to enforce various policies. It currently supports

Emulates an Edge hardware-based room sensor client purely as a CLI application

ambi_mock_client Usage You must have Rust installed to build ambi_mock_client. You can find documentation on installing Rust here. Using cargo run c

Nostr CLI client built with Rust

Nostr CLI client built with Rust Encrypted chat inside Nostr leaks metadata of who talks to who. This small CLI app implements a "public inbox," which

🧑‍💻 CLI client for zer0bin

🧑‍💻 CLI client for zer0bin

Simple but convenient CLI-based Matrix client app for sending and receiving (in Rust)

matrix-commander-rs simple but convenient CLI-based Matrix client app for sending and receiving Help create this Rust program! This project is current

simple but convenient CLI-based Nostr client app for following users and sending DMs

nostr-commander-rs TLDR: simple but convenient CLI-based Nostr client app for publishing, sending DMs, as well as following users and channels nostr-c

A simple CLI DDNS Client updater.

DDNS Client A simple DDNS client updater. Supported DDNS Servers Duck DNS How to use it ddns_client ~/.config/ddns_client/config.yaml -t 600 Config sa

Rust implementation of world of warcraft client v3.3.5a (smart CLI)

idewave-cli This is Rust implementation of World of Warcraft client v3.3.5a. Smart CLI. You can use the CLI to debug TCP packets from/to World of Warc

API bindings, CLI client and FUSE filesystem for Wiki.js written in Rust.

wikijs-rs API bindings, CLI client and FUSE filesystem for Wiki.js written in Rust. What's inside? Library: Rust bindings to Wiki.js's entire GraphQL

Releases(v0.5.0)
  • v0.5.0(Jan 30, 2022)

    Changelog

    • Add feature to remove main function before submit.
    • Add feature to remove non-Unicode characters before submit.
    • Fail submit with no header present.
    • After successful submit, print full submit details.
    • Other improvements.

    Full Changelog: https://github.com/hjaremko/baca-cli/compare/v0.4.0...v0.5.0

    Installation

    • Windows users can use a convenient installer.
    • Linux and macOS users should copy baca to ~/.local/bin or whatever your PATH is.
    • Cargo users can install with command cargo install --git https://github.com/hjaremko/baca-cli.git --tag v0.5.0
    • Arch Linux users can download the latest release from AUR.
    Source code(tar.gz)
    Source code(zip)
    baca-0.5.0-linux.zip(4.09 MB)
    baca-0.5.0-macos.zip(3.00 MB)
    baca-0.5.0-windows-setup.exe(3.16 MB)
    baca-0.5.0-windows.zip(2.61 MB)
  • v0.4.0(Oct 28, 2021)

    Changelog

    • Added automatic detection of the the allowed language of the submit.
    • Added baca last command, which prints last submit's tests statuses.
    • details now prints given submit's tests statuses.
    • last and log commands can now be filtered by task id.
    • Add the feature to rename the file to be submitted (submit --rename <filename>).
    • Renamed --default to --save, added prompt for save if not provided.
    • Added submit config to manually edit submit config.
    • Added config command to manually edit credentials and connection config.
    • Added clear command to remove .baca directory.
    • Added prompt for task.
    • Other improvements.

    Full Changelog: https://github.com/hjaremko/baca-cli/compare/v0.3.1...v0.4.0

    Installation

    • Windows users can use a convenient installer.
    • Linux and macOS users should copy baca to ~/.local/bin or whatever your PATH is.
    • Cargo users can install with command cargo install --git https://github.com/hjaremko/baca-cli.git --tag v0.4.0
    • Arch Linux users can download the latest release from AUR.
    Source code(tar.gz)
    Source code(zip)
    baca-0.4.0-linux.zip(3.25 MB)
    baca-0.4.0-macos.zip(2.30 MB)
    baca-0.4.0-windows-setup.exe(2.81 MB)
    baca-0.4.0-windows.zip(1.93 MB)
  • v0.3.1(Oct 8, 2021)

    Changelog

    • If update available, print reminder every time
    • Add interactive prompt for BaCa host
    • Add option to force update check
    • Add missing submit statuses
    • Several other improvements

    Full Changelog: https://github.com/hjaremko/baca-cli/compare/v0.3.0...v0.3.1

    Installation

    • Windows users can use a convenient installer.
    • Linux and macOS users should copy baca to ~/.local/bin or whatever your PATH is.
    • Cargo users can install with command cargo install --git https://github.com/hjaremko/baca-cli.git --tag v0.3.1
    • Arch Linux users can download the latest release from AUR.
    Source code(tar.gz)
    Source code(zip)
    baca-0.3.1-linux.zip(3.07 MB)
    baca-0.3.1-macos.zip(2.14 MB)
    baca-0.3.1-windows-setup.exe(2.73 MB)
    baca-0.3.1-windows.zip(1.80 MB)
  • v0.3.0(Jul 24, 2021)

    Changelog

    • Improved error messages
    • Added update checks once a day
    • Added interactive login
    • Added Bash and Ada support
    • Several improvements

    Installation

    • Windows users can use convenient installer.
    • Linux and macOS users should copy baca to ~/.local/bin or whatever your PATH is.
    • Cargo users can install with command cargo install --git https://github.com/hjaremko/baca-cli.git --tag v0.3.0
    • Arch Linux users can download the latest release from AUR (thanks @seqre).
    Source code(tar.gz)
    Source code(zip)
    baca-linux.zip(3.02 MB)
    baca-macos.zip(2.10 MB)
    baca-windows.zip(1.80 MB)
    setup-baca-0.3.0.exe(2.71 MB)
  • v0.2.0(Apr 18, 2021)

    Changelog

    • baca submit now requires exact language string, enabling submitting to Java and C++ with files tasks. Use baca submit clear after update. Example: baca submit -f hello.cpp -t 5 -l "C++ z obsluga plikow" --zip --default.
    • --zip now compresses file.
    • Added some missing submit statuses (thanks @Zwatotem).

    Installation

    • Windows users can use convenient installer.
    • Linux and macOS users should copy baca to ~/.local/bin or whatever your PATH is.
    • Cargo users can install with command cargo install --git https://github.com/hjaremko/baca-cli.git --tag v0.2.0
    Source code(tar.gz)
    Source code(zip)
    baca-linux.zip(2.98 MB)
    baca-macos.zip(2.06 MB)
    baca-windows.zip(1.78 MB)
    setup-baca-0.2.0.exe(2.72 MB)
  • v0.1.0(Apr 18, 2021)

    First release of the CLI client for the Jagiellonian University's BaCa online judge.

    Features

    • Submitting single file to given task with optional auto-zipping
    • Printing submit logs (no tests status currently)
    • !! Submits with hardcoded C++ language !!

    Installation

    • Windows users can use convenient installer.
    • Linux and macOS users should rename binary to baca and copy it to ~/.local/bin or whatever your PATH is.
    • Cargo users can install with command cargo install --git https://github.com/hjaremko/baca-cli.git --tag v0.1.0
    Source code(tar.gz)
    Source code(zip)
    baca-linux(9.27 MB)
    baca-macos(5.30 MB)
    baca.exe(4.45 MB)
    setup-baca-0.1.0.exe(2.69 MB)
Owner
Hubert Jaremko
Hubert Jaremko
mdBook is a utility to create modern online books from Markdown files.

Create book from markdown files. Like Gitbook but implemented in Rust

The Rust Programming Language 11.6k Jan 4, 2023
An uncluttered blackboard, ideal for simple sketches during online meetings

lavagna It's a blackboard, not a lasagna. Lavagna is a "no frills" blackboard, ideal for simple sketches during online meetings. You have just a black

Alessandro Pezzato 6 Dec 15, 2022
Calculate a player's skill level using Elo, DWZ, Ingo, TrueSkill, Glicko and Glicko-2 algorithms known from their usage in chess and online games.

skillratings Skillratings allows you to calculate the player's skill instantly in 1v1 matches or after tournaments/rating periods with a list of resul

null 10 Dec 30, 2022
Mafa is a command-line tool that helps people interact with online websites in a terminal(tty).

Table of Contents A Small Demo Installation Prerequisite Option 1: Cargo install (recommended) Option 2: Build from source Option 3: Prebuilt binaries

Michael Lee 6 Jul 10, 2023
an online arcade tic-tac-toe written in rust

Leptos Starter Template This is a template for use with the Leptos web framework and the cargo-leptos tool. Creating your template repo If you don't h

byCrookie 2 Jul 16, 2023
Mafa is a command-line tool that helps people interact with online websites in a terminal(tty).

A Small Demo Installation Prerequisite Option 1: Cargo install (recommended) Option 2: Build from source Option 3: Prebuilt binaries Mafa is for me? W

Michael Lee 6 Jul 23, 2023
Rust implementation of TARA archive format, used in Tanki Online.

Tanki Online archive format Rust implementation of .tara archive format, developed by Alternativa Platform, used in Tanki Online. License Licensed und

Araumi TO 7 Aug 13, 2023
Core lightning (CLN) plugin to watch channel health, gossip health and ping amboss for online status

vitality Core lightning (CLN) plugin to watch channel health, gossip health and ping amboss for online status Installation Building Usage Telegram Opt

null 4 Oct 6, 2023
Provides a mock Ambi client that emulates real sensor hardware such as an Edge client

ambi_mock_client Provides a mock Ambi client that emulates real sensor hardware such as an Edge client. Usage You must have Rust installed to build am

Rust Never Sleeps 2 Apr 1, 2022
CLI Web client for moedict.tw

meowdict CLI Web client for moedict.tw Usage Console Mode

Mag Mell 18 May 12, 2022