BASH was used for creating a little word pairs learning application

Magyar_zaszloApplication available only in Hungarian language!

 

Many years ago I made an application which helped me to learn pairs of words and expressions.

The program can speak out the words!

There are text based word pair lists for Hungarian and English word pairs:

  • adatok.text
  • adatok2.text
  • adatok3.text

Almost the same scripts. Just a little refactoring was made in them.

  • 5.sh
  • 6.sh
  • 7.sh

These files are for explaining the configuration of the application.

  • help.text
  • leiras.text (goes deeper in details)

Configuration files:

  • inditasi_parameterek3.conf
  • inditasi_parameterek.conf

1st param can be:
‘h’ – shows help
‘a’ – shows pairs in format: English – Hungarian
‘m’ – shows pairs in format: Hungarian – English
‘v’ – randomly mixed order

2nd parameter is an integer value. After showing the first part of the pair and before showing the part of the other language the system waits this amount of seconds.

3rd param also an integer. The system waits for the given amount of seconds after showing the whole pair and before skips to the next pair.

4th param could be
’1′ – If you want the program to wait until ENTER is pressed instead of the first waiting time. (The second parameter)
’2″ – Like the previous but second waiting time parameter affected.
’12′ – Both of the waiting amount parameters will be ignored.
’3′ or any other except ’1′, ’2′ and ’12′ . Used as a place holder if you do not care this parameter but you are interested in the following ones.

5th param.
If you want the program to speak out the words.
‘va’ – speaks English part,
‘vm’ – speaks Hungarian part.
‘vam’ or ‘vma’ – speaks Hungarian and English as well.
any other makes it to be silent.

6th param.
Do you want the program to read the pairs sequentially?
use: ‘s’
randomly: ‘r’
If there are no more parameters, then ‘r’ can be left.

7th parameter is used to set the range of used word pairs.
Can be a percentage, an integer or a negative integer.
If it follows the form of: x% then the beginning of the pairs is the x% of the text file of the pairs.
If it is a number then that means the line which has that number.
If it is a negative value, then that means the number which less with that amount than the number in the next parameter.

8th param: x% or x the upper limit of the range of listed word pairs.

This script uses espeak. If an error message can be seen below appears in your console, you should remove your bluez-alsa package from your system!

ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
Advertisements
This entry was posted in bash, others, script and tagged , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s