A plugin for beets that copies additional files and directories during the import process.
Project description
beets-additionalfiles
A plugin for beets that copies additional files and directories during the import process.
Note: This is a fork of https://github.com/Holzhaus/beets-extrafiles.
Installation
Install from PyPI
The plugin is released on PyPI and can be installed via:
$ uv pip install beets-additionalfiles
Or with pip:
$ pip3 install --user beets-additionalfiles
Install manually for development
Clone the repository and install using uv:
$ git clone https://github.com/finnyb/beets-additionalfiles.git
$ cd beets-additionalfiles
$ uv venv
$ source .venv/bin/activate # On Unix/macOS
$ uv pip install -e ".[dev]"
Usage
Activate the plugin by adding it to the plugins list in beet's config.yaml:
plugins:
# [...]
- additionalfiles
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.
additionalfiles:
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:
additionalfiles:
patterns:
artworkdir:
- '[sS]cans/'
- '[aA]rtwork/'
paths:
artworkdir: $albumpath/artwork
Development
After cloning the git repository, set up a development environment using uv:
$ git clone https://github.com/finnyb/beets-additionalfiles.git
$ cd beets-additionalfiles
$ uv venv
$ source .venv/bin/activate # On Unix/macOS
$ uv pip install -e ".[dev]"
Or use uv sync for reproducible builds:
$ uv sync --extra dev
This will install the plugin in editable mode along with all development dependencies (pytest, ruff, mypy, etc.).
When adding changes, please conform to PEP 8. Also, please add docstrings to all modules, functions and methods that you create.
Quick Commands (using Makefile)
$ make install-dev # Install with dev dependencies
$ make test # Run all tests
$ make lint # Check for linting issues
$ make format # Format code
$ make check # Run lint + tests
$ make build # Build distribution packages
Code Quality
This project uses Ruff for linting and code formatting:
$ ruff check beetsplug/ tests/ # Check for linting issues
$ ruff check --fix beetsplug/ tests/ # Auto-fix issues
$ ruff format beetsplug/ tests/ # Format code
Or use the Makefile:
$ make lint # Check for issues
$ make format # Format and fix
Testing
You should test every single commit by running the test suite:
$ pytest tests/
Or use the Makefile:
$ make test # Run all tests
$ make test-fast # Run tests in quiet mode
$ make test-coverage # Run with coverage report
If a test fails, please fix it before you create a pull request. If you accidentally commit something that still contains errors, please amend, squash or fixup that commit instead of adding a new one.
Building
To build distribution packages:
$ uv build
Or use the Makefile:
$ make build
Publishing
This project uses automated publishing via GitHub Actions. See .github/PUBLISHING.md for detailed instructions on:
- Setting up PyPI Trusted Publishing
- Publishing to TestPyPI for testing
- Creating production releases
- Troubleshooting common issues
Continuous Integration
This project uses GitHub Actions for CI/CD:
- CI: Runs tests and linting on every push and PR
- TestPyPI: Publishes release candidates for testing
- PyPI: Automatically publishes to PyPI when a GitHub Release is created
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file beets_additionalfiles-1.0.0.tar.gz.
File metadata
- Download URL: beets_additionalfiles-1.0.0.tar.gz
- Upload date:
- Size: 29.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c9981824249995e4443806ff4bc4fa53b1b7fb777099d9ed997df4f916a46ab
|
|
| MD5 |
6a469f7e3c3874a4ae99b278a0ac9c80
|
|
| BLAKE2b-256 |
0a0bfe503c1120895622dd2893c45d7cab6f3b782daf814e54e5b36246c2a43d
|
Provenance
The following attestation bundles were made for beets_additionalfiles-1.0.0.tar.gz:
Publisher:
publish.yml on finnyb/beets-additionalfiles
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
beets_additionalfiles-1.0.0.tar.gz -
Subject digest:
5c9981824249995e4443806ff4bc4fa53b1b7fb777099d9ed997df4f916a46ab - Sigstore transparency entry: 897101877
- Sigstore integration time:
-
Permalink:
finnyb/beets-additionalfiles@279eb1d46e2e9f7f2ee98d74ce6e2fd79ac26705 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/finnyb
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@279eb1d46e2e9f7f2ee98d74ce6e2fd79ac26705 -
Trigger Event:
release
-
Statement type:
File details
Details for the file beets_additionalfiles-1.0.0-py3-none-any.whl.
File metadata
- Download URL: beets_additionalfiles-1.0.0-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d1d2c59172f5f9604de14e2766c829764f55ff6e8315c06b9c39d688a1313c4
|
|
| MD5 |
11da8d629f259f5263a9cfa5ee124858
|
|
| BLAKE2b-256 |
40f80aa3c7b7ef7b02d78f8b372f2db32fcd18491be4cc61435a3f1b3fd581ee
|
Provenance
The following attestation bundles were made for beets_additionalfiles-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on finnyb/beets-additionalfiles
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
beets_additionalfiles-1.0.0-py3-none-any.whl -
Subject digest:
9d1d2c59172f5f9604de14e2766c829764f55ff6e8315c06b9c39d688a1313c4 - Sigstore transparency entry: 897101935
- Sigstore integration time:
-
Permalink:
finnyb/beets-additionalfiles@279eb1d46e2e9f7f2ee98d74ce6e2fd79ac26705 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/finnyb
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@279eb1d46e2e9f7f2ee98d74ce6e2fd79ac26705 -
Trigger Event:
release
-
Statement type: