Skip to main content

A plugin for beets that copies additional files and directories during the import process.

Project description

beets-extrafiles Build Status

A plugin for beets that copies additional files and directories during the import process.

Installation

Important: Even though beets supports Python 2 and Windows, this plugin does not - it only supports Python 3 on a Unix-like OS. See the F.A.Q. section for details.

This plugin has no dependencies apart from setuptools and beets itself.

Since this plugin is currently not released on PyPI, you need to clone and install the plugin manually:

$ git clone https://github.com/Holzhaus/beets-extrafiles.git
$ cd beets-extrafiles
$ ./setup.py install --user

Usage

Activate the plugin by adding it to the plugins list in beet's config.yaml:

plugins:
  # [...]
  - extrafiles

Also, you need to add glob patterns that 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 in albumdir/CD1 and albumdir/CD2, then all patterns will match relative to albumdir.

The snippet below will add a pattern group named all that 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 named scans, Scans, artwork or Artwork (using the pattern group artworkdir), copy them to the album path and rename them to artwork:

extrafiles:
    patterns:
        artworkdir:
          - '[sS]cans/'
          - '[aA]rtwork/'
    paths:
        artworkdir: $albumpath/artwork

Development

After cloning the git repository, you can use setup.py to set up the necessary symlinks for you:

$ git clone https://github.com/Holzhaus/beets-extrafiles.git
$ cd beets-extrafiles
$ ./setup.py develop --user

When adding changes, please conform to PEP 8. Also, please add docstrings to all modules, functions and methods that you create. Use can check this by running flake8 with the flake8-docstrings plugin.

Using pre-commit will 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 install

You should also test every single commit by running unittests, i.e.:

$ ./setup.py test

If a test fails, please fix it before you 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 the copyartifacts plugin?

The copyartifacts plugin by 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 a bug that makes it crash on every run. I wrote a patch and filed a Pull Request some 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 wrote beets-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 the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

beets-extrafiles-0.0.4.tar.gz (5.9 kB view details)

Uploaded Source

Built Distributions

beets_extrafiles-0.0.4-py3.7.egg (10.6 kB view details)

Uploaded Source

beets_extrafiles-0.0.4-py3.6.egg (10.5 kB view details)

Uploaded Source

beets_extrafiles-0.0.4-py3.5.egg (10.7 kB view details)

Uploaded Source

beets_extrafiles-0.0.4-py3.4.egg (10.7 kB view details)

Uploaded Source

beets_extrafiles-0.0.4-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file beets-extrafiles-0.0.4.tar.gz.

File metadata

  • Download URL: beets-extrafiles-0.0.4.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.4.8

File hashes

Hashes for beets-extrafiles-0.0.4.tar.gz
Algorithm Hash digest
SHA256 7155d70483173eeb5fa086420ca84b3d3bc8b3479b5d03213b79e5a12238d2d8
MD5 028cd512f9a815d19ad57b0d8f2b4453
BLAKE2b-256 ff552509c73cbc594525b3dbe63d00df071c0301b5d5a8ffa4c1dc04b5a793e9

See more details on using hashes here.

File details

Details for the file beets_extrafiles-0.0.4-py3.7.egg.

File metadata

  • Download URL: beets_extrafiles-0.0.4-py3.7.egg
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

File hashes

Hashes for beets_extrafiles-0.0.4-py3.7.egg
Algorithm Hash digest
SHA256 6c5c1d2d5325f79beab34f30f5ea313db885063f871ce9f6c34279cf5930baca
MD5 fd285bea55dfdb0b37aeba9ff47e6028
BLAKE2b-256 eac52f543fa48640119cffdd64dafb03131a2002b96b7aae6f783238358eedef

See more details on using hashes here.

File details

Details for the file beets_extrafiles-0.0.4-py3.6.egg.

File metadata

  • Download URL: beets_extrafiles-0.0.4-py3.6.egg
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

File hashes

Hashes for beets_extrafiles-0.0.4-py3.6.egg
Algorithm Hash digest
SHA256 a6d3df42d584f95b708239a40b9f7fbc37f930495188281d09784e4a7669386d
MD5 d87dd9c6bbf1079960c79819770d81d5
BLAKE2b-256 c2ea95572282239075987151052d61869e53777bdae3348472b4564ddf59ca5f

See more details on using hashes here.

File details

Details for the file beets_extrafiles-0.0.4-py3.5.egg.

File metadata

  • Download URL: beets_extrafiles-0.0.4-py3.5.egg
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.6

File hashes

Hashes for beets_extrafiles-0.0.4-py3.5.egg
Algorithm Hash digest
SHA256 9af80716cd9ae0b2e22f1464a0b9b3886affb39e7ff22e0135b8be8c3ad48a31
MD5 f6f58ec31254d8ed5237f90ba1c75a0d
BLAKE2b-256 e618aeeb1083a5143942023406d7014f5fe253c2256d4f02d5d5779ac765a7cd

See more details on using hashes here.

File details

Details for the file beets_extrafiles-0.0.4-py3.4.egg.

File metadata

  • Download URL: beets_extrafiles-0.0.4-py3.4.egg
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.4.8

File hashes

Hashes for beets_extrafiles-0.0.4-py3.4.egg
Algorithm Hash digest
SHA256 ee30236b4ebe4704c271b3dfbce6809ca94997d379b9b71ae18555acadab6331
MD5 92a679a4fe51f44b406f5d5d53206d27
BLAKE2b-256 7e41359a0e7f93c91c7bcc8255f11f546f0e312c96d185b9ed5789da3915b418

See more details on using hashes here.

File details

Details for the file beets_extrafiles-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: beets_extrafiles-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.4.8

File hashes

Hashes for beets_extrafiles-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f72ec8dc41f65b5dd0e689434e4bb7d4d128e955367f0e768a2dfe81d6f0c286
MD5 12cadaf93c4b26654e2090c3a4549f6e
BLAKE2b-256 f8d888044e304ea1bb9046da3be6bb827581bc67ab68ee232e98aee1177bbd10

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page