Compile Hoib on Linux
Dependencies
First, you need all this stuff:- wxWidgets >= 2.8 library is required
- BOOST >= 1.40 is required
- SDL_mixer >= 1.2 (part of SDL) is required
- brain >= Homo sapiens is required
Compilation
To compile Hoib, run the following command in the Hoib source directory:./configure && make
./configure --help
make install
Run
Program should be in menu:Applications -> Science -> Hoib
hoib
Known problems and fixes
wxWidgets version ... wx-config: not found
It might happend even if you had installed wxWidgets. You can have a different wx-config, for example I use wx-gtk2-unicode-config in that way:./configure --with-wx-config=wx-gtk2-unicode-config
Font size
Default value of font in Hoib is 10 points, you can change it in hoib file configuration - hoib.conf. After first run the program this file should be generated in your main directory inside .hoib folder. To change font for example on 12 just add/edit this line:[lesson] font-size=12
How help?
Yes I need help. I say it in other words: you really should help :) There are many things to make Hoib better.If your national language is not supported right now by Hoib, you can change it. Just help translate interface or introduction. If you know good and free texts you can add them into Hoib texts. And finally, you can write course for your national language.
Translate interface
If you would like help Hoib project, you can translate interface or introduction text.Hoib use gettext tool for internationalize, so translate interface into another language is very simple. All you need is poedit. If you got it, now you need file with texts to translate. Enter po directory it is in hoib source directory.Then type:
make hoib.pot
A bit complicated is translate introduction text. First, you have to create needed language directory and all files in it (see Hoib file structure for more information). After that just copy this file:
/usr/share/hoib/en_GB/intro/index.html
Hoib file structure
Each language has an own directory - language directory - where are stored files only for this language. All this directories you can find here:/usr/share/hoib
locale -a
- lessons - the directory, it contains all lessons,
- texts - the directory, it contains all texts and
- listtexts.txt - the file, it contains information about texts (authors, titles, lines, paths).
- dict.txt - the file, dictionary (not bigger than 150KB). Words are used for exercises and games,
- intro - the directory, it contains only one file index.html, which contains introduction,
export LC_ALL=pl_PL
TODO
Add new course
If you want to make same course of text first, very important things is: you need text editor which support UTF-8. Don't mix char-coding in files, Hoib supports only UTF-8, but UTF-8 supports all alphabets.It is quite easy to add new course. First, inside your language directory create the folder lessons. It contains lesson texts, descriptoin of each lessons. The most important file in this directory is lessons.txt. Example content of file:
Lesson 1 - letters: F, J, D, K desc1.txt lesson1.txt Lesson 2 - letters: A, S, L and char ; desc2.txt lesson2.txt Lesson 3 - letters: G, H desc3.txt lesson3.txt
Each new lesson consists of 3 lines:
- title of lesson
- name of file with description of this lesson, just name not full path
- name of file witch contains text of lesson, just name
- Don't add empty lines into a file. Number of all lines should divide by three without remainder, if not - you made a mistake.
- Title is used in course list of lessons and showed in title of lesson window, so it should be short and plain.
- description file is just a plain text. It should contains information about new characters (expect revision text) and place of fingers on keyboard.
- file lesson ... contains test of lesson. Hoib breaks lines if they are too long so you don't have to watch on it. Good idea is not create one-long-word-without-spaces-which-takes-all-line. Don't use tab in your text lesson, but you can break lines. Don't type space after another space.
- remember which characters was used and be careful to not add not known letters.
Add new texts
It's quite easy. First you have to have a text :) Very important thing: it must be legal. Text must be under "free licence": Creative Commons, GNU GPL, etc. I think that good idea is add well-known texts, written by good writers, so don't send your texts (unless you are Terry Pratchett). If you got one, choose an interesting part contains 15-60 lines, and copy selected part into a txt file. The file just insert into texts directory. But, it's not the and. After that you have to add information about the new text into listtexts.txt (see Hoib file structure). This file has a simple structure, each next line means:- length of text - number - just information how many lines it contains. Important: check a file length by hoib: texts->my texts->add,
- author - string,
- title - string,
- name of file with text - string - only name with extension, but not full path.
15 Bram Stoker Dracula Bram_Stoker-Dracula.txt
Make words dictionary
The words dictionary dict.txt is stored in language directory (about Hoib file structure you can read here).TODO