sampsyo/beets — pull request #1132 by mried (2014-12-05 19:00:51+00:00)
Title: New plugin interface to filter files to import

Now, a plugin can be used to filter the imported files so one has much better control what exactly is imported than just using the simple `ignore` configuration option. To test these filters, a commandline option `--enumerate-only` was also been added. Calling `beet import` using this option will only print every imported file without doing something else.
A simple plugin which uses the new interface is also included: `regexfilefilter` It uses regular expressions to determine if a file should be imported and is highly configurable. One may specify filters which are used when importing albums and some other filters when importing singletons. So it is possible to run `beet import /path/to/music; beet import -s /path/to/music` if you are able to create regex to match them accordingly.
I've not documented the plugin, yet. I'll do so if you want to merge it, of course. Nevertheless, I hope I found every place where the enumeration output must be made and where to run the filter...