rev |
line source |
igor@9
|
1
|
igor@9
|
2 '''new-words''' is a script which helps you to control your vocabulary
|
igor@9
|
3 and find unknown words in texts before you start to read them.
|
igor@9
|
4
|
igor@9
|
5 The script is intended to be run in a console; interactive part of the work
|
igor@9
|
6 done with a help of a text editor (vim by default).
|
igor@9
|
7
|
igor@9
|
8 Features:
|
igor@9
|
9 * Multilanguage support;
|
igor@9
|
10 * Dictionary software integration;
|
igor@9
|
11 * Notes to unknown words.
|
igor@9
|
12
|
igor@9
|
13 == Installation ==
|
igor@9
|
14
|
igor@9
|
15 wget http://xgu.ru/downloads/new-words.tar.gz
|
igor@9
|
16 tar xvfz new-words.tar.gz
|
igor@9
|
17 ./INSTALL
|
igor@9
|
18
|
igor@9
|
19 == First steps ==
|
igor@9
|
20
|
igor@9
|
21 First of all you have to give a program some information
|
igor@9
|
22 about your vocabularies for foreign languages (one or more).
|
igor@9
|
23 Let us learn Russian and French.
|
igor@9
|
24
|
igor@9
|
25 Find unknown words in a page from the Internet:
|
igor@9
|
26
|
igor@9
|
27 $ new-words http://ru.wikipedia.org/wiki/Москва
|
igor@9
|
28
|
igor@9
|
29 Delete (dd) words, that you know. Save the result and quit the editor (:wq).
|
igor@9
|
30
|
igor@9
|
31 Repeat the same using several other pages:
|
igor@9
|
32
|
igor@9
|
33 $ new-words http://ru.wikipedia.org/wiki/Киев
|
igor@9
|
34 $ new-words http://ru.wikipedia.org/wiki/Linux
|
igor@9
|
35
|
igor@9
|
36 Now new-words knows something about your Russian vocabulary.
|
igor@9
|
37
|
igor@9
|
38 You can do the same for other languages, e.g. for French:
|
igor@9
|
39
|
igor@9
|
40 $ new-words http://fr.wikipedia.org/wiki/Paris
|
igor@9
|
41 $ new-words http://fr.wikipedia.org/wiki/Linux
|
igor@9
|
42
|
igor@9
|
43 You can change your vocabularies data in the directory ~/.new-words:
|
igor@9
|
44
|
igor@9
|
45 $ ls -1 /home/igor/.new-words
|
igor@9
|
46 fr.txt
|
igor@9
|
47 ru.txt
|
igor@9
|
48
|
igor@9
|
49 The language of pages are automatically derived from URL for pages from Wikipedia.
|
igor@9
|
50 If you want, you can specify language manually (using -l key):
|
igor@9
|
51
|
igor@9
|
52 $ new-words -l fr http://fr.wikipedia.org/wiki/Paris
|
igor@9
|
53
|
igor@9
|
54 == External dictionaries usage ==
|
igor@9
|
55
|
igor@9
|
56 There is a script ~/bin/en was created during installation.
|
igor@9
|
57
|
igor@9
|
58 This is an example of the script, which translates its command line parameters from one language to another.
|
igor@9
|
59 This example translates its arguments from English to Russian,
|
igor@9
|
60 but you can specify another dictionary in its code.
|
igor@9
|
61
|
igor@9
|
62 Also you can create links to the file to make it possible
|
igor@9
|
63 to use external dictionaries not only for English texts (en)
|
igor@9
|
64 but for texts in any other languages.
|
igor@9
|
65
|
igor@9
|
66 $ cd ~/bin/
|
igor@9
|
67 $ ln en fr
|
igor@9
|
68 $ ln en ru
|
igor@9
|
69
|
igor@9
|
70 After that you should edit the file ~/bin/en and specify correct names of the dictionaries that have to be used
|
igor@9
|
71 to translate from the French and Russian language to the language you want.
|
igor@9
|
72
|
igor@9
|
73 You can use the dictionary wrapper from new-words:
|
igor@9
|
74 when you are in the editor working with your words,
|
igor@9
|
75 you can set a cursor at any word and press K (shift k).
|
igor@9
|
76 The dictionary wrapper will be run.
|
igor@9
|
77
|
igor@9
|
78 The wrappers' buffer will show you not only a translation of the word
|
igor@9
|
79 but sentences from the text which contain the word where the cursor were.
|
igor@9
|
80
|
igor@9
|
81
|
igor@9
|
82 == Adding notes to the words ==
|
igor@9
|
83
|
igor@9
|
84 You can add additional notes to words which you can't remember.
|
igor@9
|
85 These notes will be automatically saved and restored when needed.
|
igor@9
|
86
|
igor@9
|
87 Notes are saved in the file ~/.new-words/notes-??.txt .
|
igor@9
|
88 Here the language code should be specified instead of ?? .
|
igor@9
|
89
|
igor@9
|
90 You can browse last notes with UNIX tail command:
|
igor@9
|
91
|
igor@9
|
92 $ tail ~/.new-words/notes-ru.txt
|
igor@9
|
93
|