Debian Codegraph @

docs/plugins/filefilter.rst

raw
1 FileFilter Plugin
2 =================
3
4 The ``filefilter`` plugin allows you to skip files during import using regular
5 expressions.
6
7 To use the ``filefilter`` plugin, enable it in your configuration (see
8 :ref:`using-plugins`).
9
10 Configuration
11 -------------
12
13 To configure the plugin, make a ``filefilter:`` section in your configuration
14 file. The available options are:
15
16 - **path**: A regular expression to filter files based on their path and name.
17 Default: ``.*`` (import everything)
18 - **album_path** and **singleton_path**: You may specify different regular
19 expressions used for imports of albums and singletons. This way, you can
20 automatically skip singletons when importing albums if the names (and paths)
21 of the files are distinguishable via a regex. The regexes defined here take
22 precedence over the global ``path`` option.
23
24 Here's an example:
25
26 ::
27
28 filefilter:
29 path: .*\d\d[^/]+$
30 # will only import files which names start with two digits
31 album_path: .*\d\d[^/]+$
32 singleton_path: .*/(?!\d\d)[^/]+$