Debian Codegraph @

docs/plugins/loadext.rst

raw
1 Load Extension Plugin
2 =====================
3
4 Beets uses an SQLite database to store and query library information, which has
5 support for extensions to extend its functionality. The ``loadext`` plugin lets
6 you enable these SQLite extensions within beets.
7
8 One of the primary uses of this within beets is with the `"ICU" extension`_,
9 which adds support for case insensitive querying of non-ASCII characters.
10
11 .. _"icu" extension: https://www.sqlite.org/src/dir?ci=7461d2e120f21493&name=ext/icu
12
13 Configuration
14 -------------
15
16 To configure the plugin, make a ``loadext`` section in your configuration file.
17 The section must consist of a list of paths to extensions to load, which looks
18 like this:
19
20 .. code-block:: yaml
21
22 loadext:
23 - libicu
24
25 If a relative path is specified, it is resolved relative to the beets
26 configuration directory.
27
28 If no file extension is specified, the default dynamic library extension for the
29 current platform will be used.
30
31 Building the ICU extension
32 --------------------------
33
34 This section is for **advanced** users only, and is not an in-depth guide on
35 building the extension.
36
37 To compile the ICU extension, you will need a few dependencies:
38
39 - gcc
40 - icu-devtools
41 - libicu
42 - libicu-dev
43 - libsqlite3-dev
44
45 Here's roughly how to download, build and install the extension (although the
46 specifics may vary from system to system):
47
48 .. code-block:: shell
49
50 $ wget https://sqlite.org/2019/sqlite-src-3280000.zip
51 $ unzip sqlite-src-3280000.zip
52 $ cd sqlite-src-3280000/ext/icu
53 $ gcc -shared -fPIC icu.c $(icu-config --ldflags) -o libicu.so
54 $ cp libicu.so ~/.config/beets