Package: beets-extrafiles
beets-extrafilesA plugin forbeetsthat copies additional files and directories during the import process.InstallationImportant:Even though beets supports Python 2 and Windows, this plugin does not - it only supports Python 3 on a Unix-like OS. See theF.A.Q. sectionfor details.This plugin has no dependencies apart fromsetuptoolsandbeetsitself.The plugin in release onPyPIand can be installed via:$ pip3 install --user beets-extrafilesIt is also possible to clone the git repository and install the plugin manually:$ git clone https://github.com/Holzhaus/beets-extrafiles.git
$ cd beets-extrafiles
$ ./setup.py install --userUsageActivate the plugin by adding it to thepluginslist in beet'sconfig.yaml:plugins:# [...]-extrafilesAlso, you need to addglob patternsthat will be matched.
Patterns match files relative to the root directory of the album, which is the common directory of all the albums files.
This means that if an album has files inalbumdir/CD1andalbumdir/CD2, then all patterns will match relative toalbumdir.The snippet below will add a pattern group namedallthat matches all files that have an extension.extrafiles:patterns:all:'*.*'Pattern names are useful when you want to customize the destination path that the files will be copied or moved to.
The following configuration will match all folders namedscans,Scans,artworkorArtwork(using the pattern groupartworkdir), copy them to the album path and rename them toartwork:extrafiles:patterns:artworkdir:-'[sS]cans/'-'[aA]rtwork/'paths:artworkdir:$albumpath/artworkDevelopmentAfter cloning the git repository, you can usesetup.pyto set up the necessary symlinks for you:$ git clone https://github.com/Holzhaus/beets-extrafiles.git
$ cd beets-extrafiles
$ ./setup.py develop --userWhen adding changes, please conform toPEP 8.
Also, please add docstrings to all modules, functions and methods that you create.
Use can check this by runningflake8with theflake8-docstringsplugin.Usingpre-commitwill perform these checks automatically when committing changes.
You can install the pre-commit hooks by executing this in the git repository's root directory:$ pre-commit installYou should alsotest every single commitby running unittests, i.e.:$ ./setup.py testIf a test fails, please fix itbeforeyou create a pull request.
If you accidently commit something that still contains errors, please amend, squash or fixup that commit instead of adding a new one.F.A.Q.Why not use thecopyartifactsplugin?Thecopyartifactspluginby Samit Barakat serves the same purpose.However, it curently seems to be unmaintained:
The last commit has been made over a year ago and also suffers from abugthat makes it crash on every run.
I wrote a patch and filed aPull Requestsome time ago, but I has not been merged yet.Also, wanted to go in a different direction by supporting folders and the ability to do finer-grained path customizations.
Hence, I wrotebeets-extrafiles.Why does this plugin not support Python 2 and Windows?I initally wrote this plugin, because I needed it.
Since I use neither Python 2 nor Windows, I didn't implement support.If you really need support, feel free to write a patch and file a Pull Request.
As long as it does not make the code considerably harder to read, I'll merge it.For Windows support, some kind of Continuous Integration (CI) solution would also be necessary to prevent future breakage.What license is used for this project?This project is released under the terms of theMIT license.