crablit

Crates.iocrablit
lib.rscrablit
version0.1.6
sourcesrc
created_at2023-11-09 14:38:23.34269
updated_at2024-02-08 20:06:45.862858
descriptionA cli learning app using spaced repetition.
homepagehttps://crates.io/crates/crablit
repositoryhttps://github.com/JeromeSchmied/crablit
max_upload_size
id1030209
size585,627
(JeromeSchmied)

documentation

README

Crablit: Learning app inspired by anki, quizlet and knowt, but in the terminal.

Crates.io Version Crates.io License dependency status GitHub Actions Workflow Status GitHub commit activity GitHub issues GitHub top language

IMPORTANT!

Crablit is still in beta, functionality is not tested thoroughly.

Features

  • open-source, MIT licensed
  • Cross-platform: works on Windows, MacOS, but with GNU/Linux 1st philosophy.
  • Fast: initialization of 20000000 cards (574MB) takes about 4.3s with a maximum of 2.4GB RAM usage.
  • Written answers.

Creating files to learn

  • Easy deck making, in your favourite editor:
    • Simple .txt, .csv or .tsv file.
    • Card: <term><delimiter><definition>. eg: "to learn;lernen".
    • File of Cards with the same delimiter in every line.
    • Supported delimiters are: ';', '|', ' '(tab), '=', ':'.
    • Lines starting with # are considered to be comments.
    • Extra newlines, indent cause no problem.
    • Extra spaces around delimiter cause no problem, such as: hooray | booyah!.
    • For instance:
# example file that can be parsed by crablit

    # special soup!
    soup | Suppe

fast | schnell
alpaca | das Alpaka
proud | stolz
# I don't know what to write next. | Ich weiß nicht was...
to pour | gießen
  • Mode for Verb-learning: if you need to learn lots of verbforms, like:
# [crablit]
# mode = "verbs"
# delim = '	'

# Verben Tabelle von DaF leicht 1,2
# it's hungarian but that really doesn't matter

# INFINI	DRITTE	PRÄTER	PERFEKT 	MEANING 	KOMMENT
atmen	    atmet	atmete	h. geatmet	lélegzik	Er hat ruhig geatmet.
baden	    badet	badete	h. gebadet	fürdik  	Das Mädchen duscht den Hund.
bauen	    baut	baute	h. gebaut	épít    	Haus bauen
...

Installing

  1. Easiest, recommended: Go to releases page and see instructions built by cargo-dist.

or:

  • Install Rust, in case you don't have it.
  • Open a terminal and do one of the following install methods:
  1. From crates.io:
cargo install crablit
  1. Download source from github:
# if on windows: curl.exe
curl -L "https://github.com/JeromeSchmied/crablit/archive/main.tar.gz" | tar -xzf -
# go to the directory where it's been cloned
cd crablit-main
# install it
cargo install --path .
  1. Or you may download source with git:
# once you have git, clone the repo to have it locally
git clone --depth=1 https://github.com/JeromeSchmied/crablit.git
# go to the directory where it's been cloned
cd crablit
# install it
cargo install --path .

Usage

  • Run crablit --help to see help.
  • Type the definition of the questioned word/phrase.
  • To see hint: :hint or :h.
  • If you mistyped it, type: :typo.
  • To skip: :skip.
  • To quit: quit or exit or :q.
  • To save progress: :w or :write or :save, to continue, you can open the file just like before. It's not yet stable on Windows.
  • To edit previously typed guess, press arrow-up. Doesn't always work.
  • If NO_COLOR=1, coloring is disabled, thanks to colored.

How it works

Sample

  • See images for more!
  • It takes a source text file with deck of cards: .tsv, .csv or .txt. See examples.
  • Stores them in a vector.
  • Asks them until you know all well (currently only till you guess them right once).

Notes

  • I'm only learning Rust at the moment, so code quality might not be outstanding.
  • Flashcards, TUI, GUI, Website are coming, but it takes time.
  • Any bugs, questions shall be reported to github, or email.
  • To help with development, see todos.

Alternatives

  • speki: pretty great, but only flashcards, huge download size, tui, rust, unmaintained?
  • vocage: only flashcards, tui, rust, unmaintained?
  • flcard: only flashcards, very simple, rust, unmaintained?
  • fla.sh: only flashcards, bash
  • hascard: only flashcards, haskell
  • exhaust: I couldn't get it to work, rust, unmaintained?
Commit count: 65

cargo fmt