/rusxmms/librcc

To get this branch, use:
bzr branch http://suren.me/webbzr/rusxmms/librcc
31 by Suren A. Chilingaryan
Transliteration and Documentation Update
1
RusXMMS Project
2
===============
3
4
Originally, the project was aimed to provide means to work with multiple encodings 
5
of the same language through adapting encoding of ID3 tags, M3U and PLS playlists 
6
(including file names) to local settings on-the-fly. Both the tag reading and 
7
writing back using any selected encoding was supported.
8
Nowadays there are library available providing the same functionality for almost
9
any program with just a few lines of code. The library is not limited to ID3 tags,
10
it can be useful for any program working with small titles or file names in 
11
different languages and encodings. The patches for several music players, ID3 tag
12
libraries and some other programs are available on the project page.
13
14
The Abilities of LibRCC Library
15
===============================
16
17
    * Language Autodetection
18
    * On the fly translation between languages, using online-services!
19
    * Encoding Autodetection for most of European Languages1
20
    * Support for encoding detection plugins (besides Enca and LibRCD)
21
    * Recoding/translation of multi-language playlists!
22
    * Cache to speed-up re-recoding.
23
    * Possibility to configure new languages and encodings.
24
    * Shared configuration file. For example mentioned TagLib and LibID3 patches
25
    do not have their own user interface, but will utilize the same recoding 
26
    configuration as XMMS.
27
    * As well the separate program for configuration adjustment is available.
28
    * GTK/GTK2 UI Library: you can add properties page to your GTK application 
29
    with 3 lines of code.
30
    * Menu localization opportunity
31
32
The Available Patches
33
=====================
34
35
    * RusXMMS: Visualization and editing of the whole range of ID3 tags using any
36
    of eight byte or unicode encodings. Support for playlists with non-english 
37
    filenames. The translation of foreign languages to english or locale one is 
38
    supported as well. The embeded properties page. The patch makes XMMS the best 
39
    player to  work with ID3 titles.
40
    * TagLib: Visualization and editing of ID3 v.1 and v.2 titles. Any TagLib 
41
    based application will correctly work with ID3 tags out of the box. The 
42
    properties page can be added to application with several lines of code. 
43
    Additionaly, after applying the patch, the 'tagwriter' program from the 
44
    TagLib examples can be used to convert titles of all your MP3 files to 
45
    unicode ID3 v.2 tags just using command: "tagwriter *.mp3".
46
    * LibID3: Visualization of ID3 v.1 and v.2 titles. Any LibID3 based 
47
    application will correctly display (but not edit) ID3 tags out of the box.
48
    * Mpg123: Visualization of ID3 v.1 titles.
49
    * GFtp: Recoding file names between FTP servers using different encodings.
50
    * Unzip: Recoding file names from Windows created archives.
51
52
53
Gratitudes
54
==========
55
    * Me ;)
56
    * Michael Shigorin - Ideas and great help in wiping bugs
57
    * Dmitry A. Koptev - Slackware packages
58
    * IPE, ForschungsZentrum, Karlsruhe
59
    * CRD, Yerevan Physics Institute
60
    * Georgian and Spanish winemakers :)
61
62
Important Notes
63
===============
64
65
1. It have much more sense to report problems here, then just claiming nothing is 
66
   working on miscellaneous forums and mailing lists.
67
2. If you want patches presented here to be included in the correspondent project 
68
   trees, please, ask authors. The same thing should be concerned about inclusion 
69
   of LibRCC and LibRCD in the official Gentoo portage tree.
70
3. Most of the patches will modify configure.in and Makefile.am files, so the full
71
   autoconfiguration should be performed. 
72
   You should run "aclocal; automake; autoconf" prior to using configure script.
73
4. Output encoding normally must correspond to current "LC_CTYPE" locale. If 
74
   you would set it to another value without really knowing what are you doing, 
75
   it can raise problems.
76
77
Preferences
78
===========
79
80
    * Current Language. The English, Russian, Ukrainian, Belarussian, Bulgarian,
81
    Czech, Estonian, Croatian, Hungarian, Lithuanian, Latvian, Polish, Slovak, 
82
    Slovenian and Chinese are embeded in the library. To get other languages you 
83
    should configure them in the "/etc/rcc.xml" or in user-defined configuration 
84
    "~/.rcc/rcc.xml". By default the language will be determined using LC_CTYPE 
85
    environmental variable.
86
    * Current encoding for supported encoding classes. For RusXMMS the following
87
    classes are defined:
88
          o ID3 Encoding
89
          o ID3 v.2 Encoding (uses ID3 by default)
90
          o PlayList Encoding (uses ID3 by default)
91
          o Encoding for Filenames in the Playlists (defaults to FS encoding)
92
          o FileSystem Encoding (uses locale encoding by default)
93
          o Output Encoding (uses locale encoding by default)
94
    The default encoding will be resolved using:
95
          o The unicode encoding selected for english language.
96
          o The encoding of the parrent class if any.
97
          o The unicode encoding defined by locale variable or any locale encoding 
98
	  in the case of locale language is used.
99
          o First available usable encoding.
100
    * Encoding autodetection engine. First available is used by default.
101
    * Mode for recoding cache:
102
          o Off: Do not use recoding cache
103
          o On: Use recoding cache to find out encoding and language
104
          o ReLearn: Fill recoding cache with detected values
105
          o Learn: Try to use recoding cache to find out encoding. If there are 
106
	  no cached encoding for current title try to detect it and store in the 
107
	  cache.
108
    * Autodetect File Name: If option is switched on the encoding of the file 
109
    will be resolved using search over file system.
110
    * Autoengine Set Current Encoding: Encoding autodetection engine will 
111
    automatically set detected encoding to be used by default.
112
    * Autodetect Language: Try to autodetect used language. Quite slow.
113
    * Translate Text: Translate text from detected language to the locale 
114
    language. Very slow and requires internet connection. The different modes is 
115
    available. In the full mode the string will be translated to the current 
116
    locale language. If translation to locale language is failed, the string will
117
    be translated to english. With "Skip Related" and "Skip parrent" options the
118
    translation between related languages will be omited (The language is 
119
    considered to be parrent language in the case then it is expected to have 
120
    words from that language in the strings of child language. The english 
121
    language is considered to be parrent language for any other.). 
122
    With "Translate to English" option it is possible to translate all strings 
123
    to english.
124
    * Since the translation is slow, it is possible to limit maximum time used to
125
    recode/translate string. In this case if translation in the specified amount 
126
    of time is not finished, untranslated string will be returned. However, the 
127
    string will be queued for translation and in the next access the translated 
128
    and cached value will be returned.
129
    * Additionally, for RusXMMS only it is possible to specify font used by shade
130
    form of xmms playlist.
131
132
Using Multi-Language Playlist
133
=============================
134
There are two ways of using multi-language playlists. The first is to use 
135
Language autodetection:
136
137
    * The UTF-8 locale should be set.
138
    * The LibRCC should be compiled with aspell support.
139
    * The aspell dictionaries for all languages used should be installed.
140
141
However this is quite slow, and errnous in the cases then mostly non-dictionary 
142
words are used. The second option, is to use recodings cache:
143
144
    * The UTF-8 locale should be set.
145
    * Select "Learn" mode for recoding caching policy in the preferences prior
146
    to loading new files.
147
    * Afterwards the titles for the loaded files will be recoded correctly 
148
    whenever the recoding caching is enabled.
149
150
Using Language Translation
151
==========================
152
It is possible to translate titles to your languages using libtranslate. 
153
The LibRCC should be compiled with LibTranslate support (It will be quite good 
154
idea to use patched libtranslated with posibility to limit maximum amount of 
155
time spent for translation) and you should have internet connection. Since 
156
libtranslate utilizes online translation services it takes a lot of time to get
157
translation. To solve this problem the translation queueing and caching is used.
158
If translation is failed in considered amount of time error will be returned to 
159
caller and string will be queued for translation. The translated string will be
160
stored in the DB4 cache and will be returned to caller on the following requests
161
for translation.