proycon / vocage

A minimalistic spaced-repetion vocabulary trainer (flashcards) for the terminal
GNU General Public License v3.0
142 stars 10 forks source link

swap the columns #10

Closed paum3 closed 2 years ago

paum3 commented 2 years ago

Hi,

Thanks for nice program. I am wondering, how to swap columns. What I mean: I have: lang1 lang2, an in this case is lang2 showed as "question" and lang1 showed as a "solution". Is it possibile to have the opposite behaviour, so that lang1 will be a question and lang2 solution?

Thank you

aklindt commented 2 years ago

Hi paum3,

it is possible! If at the end of the *.tsv file you define

#--columns lang1,lang2 #--showcolumns lang1 #--showcolumns lang2

you get the normal behaviour that lang1 is shown as the first side of the card, the "question", and lang2 as the second side, the "solution". However, you can overwrite this and effectivly "swap the columns" or sides when you start your learning session with:

vocage -C lang2 -C lang1

Notice, that the option -C is invoked twice, once for each side of the card.

proycon commented 2 years ago

Thanks @aklindt , that is indeed the proper solution, you can select any arbitrary column as 'question' and 'answer', or combine multiple at once on a side of a card by specifying a comma separated list.

paum3 commented 2 years ago

Thanks!