1The Plugin
2==========
3
4The ``the`` plugin allows you to move patterns in path formats. It's suitable,
5for example, for moving articles from string start to the end. This is useful
6for quick search on filesystems and generally looks good. Plugin does not
7change tags. By default plugin supports English "the, a, an", but custom
8regexp patterns can be added by user. How it works::
9
10    The Something -> Something, The
11    A Band -> Band, A
12    An Orchestra -> Orchestra, An
13
14To use the ``the`` plugin, enable it (see :doc:`/plugins/index`) and then use
15a template function called ``%the`` in path format expressions::
16
17    paths:
18        default: %the{$albumartist}/($year) $album/$track $title
19
20The default configuration moves all English articles to the end of the string,
21but you can override these defaults to make more complex changes.
22
23Configuration
24-------------
25
26To configure the plugin, make a ``the:`` section in your
27configuration file. The available options are:
28
29- **a**: Handle "A/An" moves.
30  Default: ``yes``.
31- **the**: handle "The" moves.
32  Default: ``yes``.
33- **patterns**: Custom regexp patterns, space-separated. Custom patterns are
34  case-insensitive regular expressions. Patterns can be matched anywhere in the
35  string (not just the beginning), so use ``^`` if you intend to match leading
36  words.
37  Default: ``[]``.
38- **strip**: Remove the article altogether instead of moving it to the end.
39  Default: ``no``.
40- **format**: A Python format string for the output. Use ``{0}`` to indicate
41  the part without the article and ``{1}`` for the article.
42  Spaces are already trimmed from ends of both parts.
43  Default: ``'{0}, {1}'``.
44