A tactics trainer for the command line

Overview

Chess Tactics CLI

Screen shot

Practice some chess tactics in your terminal while you wait for your code to compile. Fetches tactics from this tactics API.

Built With

Installation

cargo install tactics-trainer-cli

Usage

Usage is straightforward, just run tactics-trainer

tactics-trainer

Or specify some tags (See this file for all tags):

tactics-trainer --tags mateIn1

Or specify a rating range:

tactics-trainer --rating=600-1200

Roadmap

  • Sessions
  • Spaced repetition of failed puzzles
  • AND queries for themes

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Marcus Bufett - @marcusbuffett - [email protected]

You might also like...
Command-Line program that takes images and produces the copy of the image with a thin frame and palette made of the 10 most frequent colors.
Command-Line program that takes images and produces the copy of the image with a thin frame and palette made of the 10 most frequent colors.

paleatra v.0.0.1 Command-Line program that takes an image and produces the copy of the image with a thin frame and palette made of the 10 most frequen

parse command-line arguments into a hashmap and vec of positional args

parse command-line arguments into a hashmap and vec of positional args This library doesn't populate custom structs, format help messages, or convert types.

Cork is a simple command-line calculator, mainly targeted towards people who deal with hex numbers
Cork is a simple command-line calculator, mainly targeted towards people who deal with hex numbers

Cork is a simple command-line calculator, mainly targeted towards people who deal with hex numbers. It deals only with integer arithmetic. Expressions may involve mixed bases (limited to decimal, hexadecimal, octal and binary numbers). The global output format may be set to a particular radix - by default it is hex.

A small command-line application to view images from the terminal written in Rust.
A small command-line application to view images from the terminal written in Rust.

A small command-line application to view images from the terminal written in Rust. It is basically the front-end of viuer

belt is a command line app that can show your time from a list of selected time zones

A CLI app to show your time from a list of selected time zones, and a rust lib to parse dates in string formats that are commonly used.

rip is a command-line deletion tool focused on safety, ergonomics, and performance

rip (Rm ImProved) rip is a command-line deletion tool focused on safety, ergonomics, and performance. It favors a simple interface, and does not imple

A command-line benchmarking tool
A command-line benchmarking tool

hyperfine 中文 A command-line benchmarking tool. Demo: Benchmarking fd and find: Features Statistical analysis across multiple runs. Support for arbitra

An interactive cheatsheet tool for the command-line
An interactive cheatsheet tool for the command-line

navi An interactive cheatsheet tool for the command-line. navi allows you to browse through cheatsheets (that you may write yourself or download from

A command-line downloader for sites archived on the Wayback Machine

This is a small command-line utility I wrote to help with browsing archived websites from the Wayback Machine, which can sometimes be pretty slow.

Comments
  • Fails to get tactics from server when using --rating

    Fails to get tactics from server when using --rating

    I am getting an error,

    $ tactics-trainer --rating=600-1200
    thread 'main' panicked at 'Failed to get a new tactic from the server, exiting.: error decoding response body: EOF while parsing a value at line 1 column 0
    
    Caused by:
        EOF while parsing a value at line 1 column 0', /home/simonj/.cargo/registry/src/github.com-1ecc6299db9ec823/tactics-trainer-cli-1.0.2/src/main.rs:65:6
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
    

    whenever I use the --rating option. Just typing tactics-trainer works fine though.

    opened by SimonKvantdator 0
  • Install fails: error[E0432]: unresolved import `clap::Clap`

    Install fails: error[E0432]: unresolved import `clap::Clap`

    ❯ cargo install tactics-trainer-cli Updating crates.io index Installing tactics-trainer-cli v1.0.0 Compiling autocfg v1.0.1 Compiling libc v0.2.112 Compiling proc-macro2 v1.0.34 Compiling unicode-xid v0.2.2 Compiling cfg-if v1.0.0 Compiling syn v1.0.82 Compiling memchr v2.4.1 Compiling log v0.4.14 Compiling pkg-config v0.3.24 Compiling cc v1.0.72 Compiling lazy_static v1.4.0 Compiling parking_lot_core v0.8.5 Compiling pin-project-lite v0.2.7 Compiling bytes v1.1.0 Compiling futures-core v0.3.17 Compiling serde_derive v1.0.132 Compiling scopeguard v1.1.0 Compiling smallvec v1.7.0 Compiling once_cell v1.9.0 Compiling itoa v0.4.8 Compiling serde v1.0.132 Compiling bitflags v1.3.2 Compiling futures-task v0.3.17 Compiling openssl v0.10.38 Compiling fnv v1.0.7 Compiling foreign-types-shared v0.1.1 Compiling hashbrown v0.11.2 Compiling matches v0.1.9 Compiling httparse v1.5.1 Compiling pin-utils v0.1.0 Compiling ryu v1.0.9 Compiling futures-channel v0.3.17 Compiling tinyvec_macros v0.1.0 Compiling native-tls v0.2.8 Compiling futures-sink v0.3.17 Compiling percent-encoding v2.1.0 Compiling slab v0.4.5 Compiling try-lock v0.2.3 Compiling openssl-probe v0.1.4 Compiling serde_json v1.0.73 Compiling encoding_rs v0.8.30 Compiling regex-automata v0.1.10 Compiling tower-service v0.3.1 Compiling unicode-bidi v0.3.7 Compiling httpdate v1.0.2 Compiling byteorder v1.4.3 Compiling shakmaty v0.19.0 Compiling anyhow v1.0.51 Compiling itoa v1.0.1 Compiling encode_unicode v0.3.6 Compiling termcolor v1.1.2 Compiling unicode-width v0.1.9 Compiling arrayvec v0.7.2 Compiling mime v0.3.16 Compiling textwrap v0.14.2 Compiling base64 v0.13.0 Compiling strsim v0.10.0 Compiling ipnet v2.3.1 Compiling rprompt v1.0.5 Compiling instant v0.1.12 Compiling tracing-core v0.1.21 Compiling indexmap v1.7.0 Compiling futures-util v0.3.17 Compiling num-traits v0.2.14 Compiling lock_api v0.4.5 Compiling foreign-types v0.3.2 Compiling http v0.2.5 Compiling tinyvec v1.5.1 Compiling form_urlencoded v1.0.1 Compiling openssl-sys v0.9.72 Compiling tracing v0.1.29 Compiling want v0.3.0 Compiling unicode-normalization v0.1.19 Compiling csv-core v0.1.10 Compiling os_str_bytes v6.0.0 Compiling quote v1.0.10 Compiling mio v0.7.14 Compiling num_cpus v1.13.0 Compiling signal-hook-registry v1.4.0 Compiling atty v0.2.14 Compiling socket2 v0.4.2 Compiling dirs v1.0.5 Compiling http-body v0.4.4 Compiling idna v0.2.3 Compiling parking_lot v0.11.2 Compiling btoi v0.4.2 Compiling colored v2.0.0 Compiling clap v3.0.0-rc.7 Compiling term v0.5.2 Compiling url v2.2.2 Compiling tokio-macros v1.7.0 Compiling tokio v1.15.0 Compiling tokio-util v0.6.9 Compiling tokio-native-tls v0.3.0 Compiling h2 v0.3.9 Compiling bstr v0.2.17 Compiling serde_urlencoded v0.7.0 Compiling csv v1.1.6 Compiling prettytable-rs v0.8.0 Compiling hyper v0.14.16 Compiling hyper-tls v0.5.0 Compiling reqwest v0.11.7 Compiling tactics-trainer-cli v1.0.0 error[E0432]: unresolved import clap::Clap --> /home/paulabrams/.cargo/registry/src/github.com-1ecc6299db9ec823/tactics-trainer-cli-1.0.0/src/main.rs:8:25 | 8 | use clap::{AppSettings, Clap}; | ^^^^ no Clap in the root

    error: cannot determine resolution for the derive macro Clap --> /home/paulabrams/.cargo/registry/src/github.com-1ecc6299db9ec823/tactics-trainer-cli-1.0.0/src/main.rs:20:10 | 20 | #[derive(Clap, Debug)] | ^^^^ | = note: import resolution is stuck, try simplifying macro imports

    error: cannot find attribute clap in this scope --> /home/paulabrams/.cargo/registry/src/github.com-1ecc6299db9ec823/tactics-trainer-cli-1.0.0/src/main.rs:21:3 | 21 | #[clap(version = "1.0", author = "Marcus B. [email protected]")] | ^^^^ | = note: clap is in scope, but it is a crate, not an attribute

    error: cannot find attribute clap in this scope --> /home/paulabrams/.cargo/registry/src/github.com-1ecc6299db9ec823/tactics-trainer-cli-1.0.0/src/main.rs:22:3 | 22 | #[clap(setting = AppSettings::ColoredHelp)] | ^^^^ | = note: clap is in scope, but it is a crate, not an attribute

    error: cannot find attribute clap in this scope --> /home/paulabrams/.cargo/registry/src/github.com-1ecc6299db9ec823/tactics-trainer-cli-1.0.0/src/main.rs:24:7 | 24 | #[clap(short, long)] | ^^^^ | = note: clap is in scope, but it is a crate, not an attribute

    error: cannot find attribute clap in this scope --> /home/paulabrams/.cargo/registry/src/github.com-1ecc6299db9ec823/tactics-trainer-cli-1.0.0/src/main.rs:28:7 | 28 | #[clap(short, long)] | ^^^^ | = note: clap is in scope, but it is a crate, not an attribute

    error[E0599]: no function or associated item named parse found for struct Args in the current scope --> /home/paulabrams/.cargo/registry/src/github.com-1ecc6299db9ec823/tactics-trainer-cli-1.0.0/src/main.rs:36:22 | 23 | struct Args { | ----------- function or associated item parse not found for this ... 36 | let opts = Args::parse(); | ^^^^^ function or associated item not found in Args | = help: items from traits can only be used if the trait is implemented and in scope = note: the following trait defines an item parse, perhaps you need to implement it: candidate #1: StructOpt

    Some errors have detailed explanations: E0432, E0599. For more information about an error, try rustc --explain E0432. error: failed to compile tactics-trainer-cli v1.0.0, intermediate artifacts can be found at /tmp/cargo-install1AbjFT

    Caused by: could not compile tactics-trainer-cli due to 7 previous errors ❯ ❯

    opened by pabrams 0
Owner
Marcus Buffett
I hack on stuff sometimes
Marcus Buffett
Small command-line tool to switch monitor inputs from command line

swmon Small command-line tool to switch monitor inputs from command line Installation git clone https://github.com/cr1901/swmon cargo install --path .

William D. Jones 5 Aug 20, 2022
Command-line HTTP client for sending a POST request to specified URI on each stdin line.

line2httppost Simple tool to read lines from stdin and post each line as separate POST request to a specified URL (TCP connection is reused though). G

Vitaly Shukela 3 Jan 3, 2023
Pink is a command-line tool inspired by the Unix man command.

Pink is a command-line tool inspired by the Unix man command. It displays custom-formatted text pages in the terminal using a subset of HTML-like tags.

null 3 Nov 2, 2023
Checkline: checkbox line picker for stdin line input

checkline is a Unix command line interface (CLI) terminal user interface (TUI) that prompts you to check each line of stdin, to pick each line to output to stdout

SixArm 4 Dec 4, 2022
A full featured, fast Command Line Argument Parser for Rust

clap Command Line Argument Parser for Rust It is a simple-to-use, efficient, and full-featured library for parsing command line arguments and subcomma

null 10.4k Jan 10, 2023
Docopt for Rust (command line argument parser).

THIS CRATE IS UNMAINTAINED This crate is unlikely to see significant future evolution. The primary reason to choose this crate for a new project is if

null 743 Jan 1, 2023
Parse command line arguments by defining a struct.

StructOpt Parse command line arguments by defining a struct. It combines clap with custom derive. Documentation Find it on Docs.rs. You can also check

Guillaume P. 2.6k Jan 5, 2023
A command line progress reporting library for Rust

indicatif Documentation A Rust library for indicating progress in command line applications to users. This currently primarily provides progress bars

Armin Ronacher 3.2k Dec 30, 2022
Low-level Rust library for implementing terminal command line interface, like in embedded systems.

Terminal CLI Need to build an interactive command prompt, with commands, properties and with full autocomplete? This is for you. Example, output only

HashMismatch 47 Nov 25, 2022
⚡️ Lightning-fast and minimal calendar command line. Written in Rust 🦀

⚡️ Lightning-fast and minimal calendar command line. It's similar to cal. Written in Rust ??

Arthur Henrique 36 Jan 1, 2023