Giter Site home page Giter Site logo

ballerburg9005 / bashflashcards Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 23 KB

Bash script 2 train vocabulary alike flash cards. Checks answers & cycles wrong 1s. Multi-spelling, multi-meaning, reverse card, CSV, multi-file + piped input.

License: MIT License

Shell 100.00%
languages vocabulary-learning vocabulary-flashcards flashcards multi-spelling multi-meaning reverse-card csv multi-file piped-input

bashflashcards's Introduction

Bash Flash Cards

This is a bash script to train vocabulary, alike flash cards. Only tested on Linux!

bashflashcards [OPTION] file1.txt [file2.txt] .. [fileN.txt]  
OPTION: -r -reverse		Switches between asking for meaning or word.  

file1.txt has the following format as in the example file "lesson1.txt":

#comments  
word		meaning, meaning, meaning  
word[:space:],;\+meaning,meaning,	meaning
word,meaning,meaning,meaning
...  

It should thereby also be able to read regular CSV files.

The script will shuffle the words and then ask for them, with wrong answers being shuffled and appended at the end.

It will detect the right or wrong answer, even if you only use ASCII characters and also if it contains at most one typo.

Parenthesis are used for alternative spelling, e.g. lu(h)gal(l) validates correct as luhgal, luhgall, lugal, lugall

Example:

correct answer: diĝi(r)

  • user input: d1gir -> validates as correct (only one wrong character, any amount of non-ASCII characters are transcribed to the next best thing)
  • user input: d1g1r -> validates as wrong (two wrong characters)
  • user input: igi -> validates as correct (one missing character and anything in parenthesis is optional)
  • user input: œigir -> by rare exception this would validate as wrong, because "œ" is transcribed as "oe" for validation, thus oeigir is counted as having two incorrect characters

Sample Output

% bashflashcards lesson1_abridged.txt

================= dub-sar =================
ANSWER: tablet-writer (user input)
scribe, "tablet-writer"
			      :)++RIGHT++(:
=================== me₃ ===================
ANSWER: combat
battle, combat
			      :)++RIGHT++(:
================== nita₂ ==================
ANSWER: men 
man, male
			      :)++RIGHT++(:
================= kala(g) =================
ANSWER: mightyy
mighty
			      :)++RIGHT++(:
=================== tur ===================
ANSWER: young
small, young
			      :)++RIGHT++(:
ALL DONE! AWESOME!
YOU MADE ZERO MISTAKES!

% cat lesson1_abridged.txt | bashflashcards -r

============== battle, combat =============
ANSWER: nita2 (user input)
me₃
			      --:(WRONG):--
========= scribe, "tablet-writer" =========
ANSWER: dubsar
dub-sar
			      :)++RIGHT++(:
=============== small, young ==============
ANSWER: kur
tur
			      :)++RIGHT++(:
================ man, male ================
ANSWER: nita2
nita₂
			      :)++RIGHT++(:
================== mighty =================
ANSWER: zkalag
kala(g)
			      :)++RIGHT++(:
--->Still 1 to go!
============== battle, combat =============
ANSWER: me₃
me₃
			      :)++RIGHT++(:
ALL DONE! AWESOME!
STATS: 1 wrong answers.
STATS: Wrong words: me₃ 

bashflashcards's People

Contributors

ballerburg9005 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.