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.2.tar.gz (5.8 kB view details)

Uploaded Source

Built Distributions

beets_extrafiles-0.0.2-py3.7.egg (10.2 kB view details)

Uploaded Source

beets_extrafiles-0.0.2-py3.6.egg (10.2 kB view details)

Uploaded Source

beets_extrafiles-0.0.2-py3.5.egg (10.3 kB view details)

Uploaded Source

beets_extrafiles-0.0.2-py3.4.egg (10.3 kB view details)

Uploaded Source

beets_extrafiles-0.0.2-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: beets-extrafiles-0.0.2.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.6.7

File hashes

Hashes for beets-extrafiles-0.0.2.tar.gz
Algorithm Hash digest
SHA256 14ef5acbd8107e6c3c24a61dab13889a60a5a45e23bbaa1aa80779bdfb8a62fb
MD5 a657465b83b3b85c9a936624fd453d91
BLAKE2b-256 79741e8ded76fc40385520c4a8804957d1aa91b83f664b65c601d856e930b266

See more details on using hashes here.

File details

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

File metadata

  • Download URL: beets_extrafiles-0.0.2-py3.7.egg
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.7.1

File hashes

Hashes for beets_extrafiles-0.0.2-py3.7.egg
Algorithm Hash digest
SHA256 28066a42bb1835d28ff2bd5c695abaf3252aefe6b6f5b2e88bd0a0d28aa2f24a
MD5 2c93233065a497f7437beb839be0a576
BLAKE2b-256 5f53f3d4bca98382da2ca2bc636f63042ac7e3b91a6989dc27733d3ab8193ee0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: beets_extrafiles-0.0.2-py3.6.egg
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.6.7

File hashes

Hashes for beets_extrafiles-0.0.2-py3.6.egg
Algorithm Hash digest
SHA256 50a61357c989cf088f3c354a4ae8ea6cea5ce64c56519f76b4158491fa7e8788
MD5 dce77a26234ed9d6f7e2d39000068d7c
BLAKE2b-256 d426fee5a80f69ea50ac0961d36ae07ab02d9dd775d78a1fbb8c0b151bc2b436

See more details on using hashes here.

File details

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

File metadata

  • Download URL: beets_extrafiles-0.0.2-py3.5.egg
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.5.6

File hashes

Hashes for beets_extrafiles-0.0.2-py3.5.egg
Algorithm Hash digest
SHA256 0991838bea19154f3f7225d334162588a2f01a40d2de7311f523dec9631eb5ea
MD5 192004dfb845beac54f62d3857cb284e
BLAKE2b-256 d426e0f1a03d61103f1cb516ff6dcac554f24bb494a9d94d4ffd854aa93454d8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: beets_extrafiles-0.0.2-py3.4.egg
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.4.8

File hashes

Hashes for beets_extrafiles-0.0.2-py3.4.egg
Algorithm Hash digest
SHA256 bc8b3fbbb64f3655b7c87c285260ebf84f84da6f814884f7371d33fba08ab6a8
MD5 33a966363f108771e339da7b99772f32
BLAKE2b-256 ebbbda4d1550c337b98cbb71a82edbfdd0fe1c7237c7b48ddbdc5cb201cb24c0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: beets_extrafiles-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.6.7

File hashes

Hashes for beets_extrafiles-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3ac35b754741d97c6e4c099b52e5aebee20bf6d1e71045d9cbf50783ae59c95a
MD5 1cd01bcd5ba7487a0c8a616ebf41950b
BLAKE2b-256 fe9df587172ace60d90db8fb6ee30ea2c7b6d6b75a0d2ab8c68b3eae458ed759

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