![GitHub last commit](https://img.shields.io/github/last-commit/iluvcapra/mfbatch)
![](https://img.shields.io/github/license/iluvcapra/mfbatch.svg) ![](https://img.shields.io/pypi/pyversions/mfbatch.svg) [![](https://img.shields.io/pypi/v/mfbatch.svg)](https://pypi.org/project/mfbatch/) ![](https://img.shields.io/pypi/wheel/mfbatch.svg)
[![Lint and Test](https://github.com/iluvcapra/mfbatch/actions/workflows/pylint.yml/badge.svg)](https://github.com/iluvcapra/mfbatch/actions/workflows/pylint.yml)
# mfbatch
`mfbatch` is a command-line tool for batch-editing FLAC audio file metadata.
It reads a directory of FLAC files, extracts the existing metadata to an
intelligent text file format that the user can modify to update a large number
of files and dynamic per-file metadata with a minimal number of edits.
`mfbatch` is a front-end for `metaflac(1)` which must be installed on the
system.
## Motivation
I've been reorganzing my sound effects library recently and have had to edit a
large number of FLAC files, adding and editing descriptions, normalizing
fields etc. and this is one of the tools I've come up with for updating a large
number of FLAC files in an easy way quickly. It works completely in the command
line and is designed to be used with your favorite text editor.
## Workflow
### 1) Create a new `MFBATCH_LIST` file for a directory of FLAC files.
```sh
$ cd path/to/my/flacs
$ mfbatch -c
```
`mfbatch` will scan the current working directory and
all subdirectories recursively. You can use a `-p` option
to switch to another directory before scanning.
### 2) Edit the `MFBATCH_LIST` file in your `$EDITOR`.
```sh
$ mfbatch --edit
```
The `MFBATCH_LIST` file will contain a transcript of all of the flac files
in the selected folder along with their current metadata.
```sh
:set ALBUM 'Test Album 1'
:set ARTIST 'Test Artist'
:set DESCRIPTION 'Tone file #1, test tone 440Hz'
:setp TITLE DESCRIPTION "^Tone file #(\d+).*" 'Tone \1'
./tone1.flac
:set DESCRIPTION 'Tone file #2, also 440Hz'
./tone2.flac
:unset DESCRIPTION
:set DESCRIPTION 'Tone file #3'
./tone3.flac
```
The `MFBATCH_LIST` format allows you to set metadata once and then write values
to a run of files all at once. Several commands are available to manipulate
the metadata written to the files.
### 3) After you've made the changes you want to make, write them to the files.
```sh
$ mfbatch -W
```
Writing metadata is interactive, `mfbatch` will display the
metdata to be written to each file and metadata can be
edited interactively at a prompt before writing.
## Limitations
* Does not support newlines in field values. This is mostly by choice, newlines
don't offer any benefit in my preferred sound library programs but this
wouldn't be a tough feature to add if anyone needed it.
* Does not support multiple artwork types, everything is stored as type `3`/
(album artwork-front).
* Can only store unique field keys, field values of the same key overwrite old
values. This is also something that is tailored to my use-case and could be
changed if there was interest in doing so.
Raw data
{
"_id": null,
"home_page": "https://github.com/iluvcapra/mfbatch",
"name": "mfbatch",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": "flac, metadata, audio, multimedia, console, scripting",
"author": "Jamie Hardt",
"author_email": "jamiehardt@me.com",
"download_url": "https://files.pythonhosted.org/packages/12/2d/f6c94628a240bba06b769aa8c94f30c2f83a3ed4b35b6d718f9f83deec87/mfbatch-0.4.1.tar.gz",
"platform": null,
"description": "![GitHub last commit](https://img.shields.io/github/last-commit/iluvcapra/mfbatch)\n![](https://img.shields.io/github/license/iluvcapra/mfbatch.svg) ![](https://img.shields.io/pypi/pyversions/mfbatch.svg) [![](https://img.shields.io/pypi/v/mfbatch.svg)](https://pypi.org/project/mfbatch/) ![](https://img.shields.io/pypi/wheel/mfbatch.svg)\n\n[![Lint and Test](https://github.com/iluvcapra/mfbatch/actions/workflows/pylint.yml/badge.svg)](https://github.com/iluvcapra/mfbatch/actions/workflows/pylint.yml)\n\n# mfbatch\n\n`mfbatch` is a command-line tool for batch-editing FLAC audio file metadata. \nIt reads a directory of FLAC files, extracts the existing metadata to an \nintelligent text file format that the user can modify to update a large number\nof files and dynamic per-file metadata with a minimal number of edits.\n\n`mfbatch` is a front-end for `metaflac(1)` which must be installed on the\nsystem.\n\n## Motivation\n\nI've been reorganzing my sound effects library recently and have had to edit a \nlarge number of FLAC files, adding and editing descriptions, normalizing \nfields etc. and this is one of the tools I've come up with for updating a large\nnumber of FLAC files in an easy way quickly. It works completely in the command\nline and is designed to be used with your favorite text editor.\n\n## Workflow\n\n### 1) Create a new `MFBATCH_LIST` file for a directory of FLAC files.\n\n```sh \n$ cd path/to/my/flacs \n$ mfbatch -c \n```\n\n`mfbatch` will scan the current working directory and \nall subdirectories recursively. You can use a `-p` option \nto switch to another directory before scanning.\n\n### 2) Edit the `MFBATCH_LIST` file in your `$EDITOR`.\n```sh \n$ mfbatch --edit\n```\n\nThe `MFBATCH_LIST` file will contain a transcript of all of the flac files \nin the selected folder along with their current metadata.\n\n```sh \n:set ALBUM 'Test Album 1'\n:set ARTIST 'Test Artist'\n:set DESCRIPTION 'Tone file #1, test tone 440Hz'\n:setp TITLE DESCRIPTION \"^Tone file #(\\d+).*\" 'Tone \\1'\n./tone1.flac\n\n:set DESCRIPTION 'Tone file #2, also 440Hz'\n./tone2.flac\n:unset DESCRIPTION\n\n:set DESCRIPTION 'Tone file #3'\n./tone3.flac\n\n```\n\nThe `MFBATCH_LIST` format allows you to set metadata once and then write values\nto a run of files all at once. Several commands are available to manipulate\nthe metadata written to the files.\n\n### 3) After you've made the changes you want to make, write them to the files.\n\n```sh \n$ mfbatch -W\n```\n\nWriting metadata is interactive, `mfbatch` will display the\nmetdata to be written to each file and metadata can be\nedited interactively at a prompt before writing.\n\n## Limitations\n\n* Does not support newlines in field values. This is mostly by choice, newlines\n don't offer any benefit in my preferred sound library programs but this\n wouldn't be a tough feature to add if anyone needed it.\n* Does not support multiple artwork types, everything is stored as type `3`/\n (album artwork-front).\n* Can only store unique field keys, field values of the same key overwrite old\n values. This is also something that is tailored to my use-case and could be\n changed if there was interest in doing so.\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "MetaFlac batch editor",
"version": "0.4.1",
"project_urls": {
"Homepage": "https://github.com/iluvcapra/mfbatch",
"Repository": "https://github.com/iluvcapra/mfbatch.git"
},
"split_keywords": [
"flac",
" metadata",
" audio",
" multimedia",
" console",
" scripting"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f906825e5947f161f725732f6bda772874dd6c7c319d54d99b803811ad867260",
"md5": "9c098626edd8fd73ef3e4de7f2e7bb2b",
"sha256": "35d67fabac1d91b7ecb397e1cdf4dcb23230bdc0e9a593e51d88f5166ed5a323"
},
"downloads": -1,
"filename": "mfbatch-0.4.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9c098626edd8fd73ef3e4de7f2e7bb2b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 9858,
"upload_time": "2024-07-08T05:30:25",
"upload_time_iso_8601": "2024-07-08T05:30:25.921434Z",
"url": "https://files.pythonhosted.org/packages/f9/06/825e5947f161f725732f6bda772874dd6c7c319d54d99b803811ad867260/mfbatch-0.4.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "122df6c94628a240bba06b769aa8c94f30c2f83a3ed4b35b6d718f9f83deec87",
"md5": "2b60e68b53b9b7a216ed8fa705aaf948",
"sha256": "1e42c163e20a7c71a1e28f0e0e23838cc9a2f7ff7eeeef3c4b5c7a3118153431"
},
"downloads": -1,
"filename": "mfbatch-0.4.1.tar.gz",
"has_sig": false,
"md5_digest": "2b60e68b53b9b7a216ed8fa705aaf948",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 9441,
"upload_time": "2024-07-08T05:30:27",
"upload_time_iso_8601": "2024-07-08T05:30:27.355067Z",
"url": "https://files.pythonhosted.org/packages/12/2d/f6c94628a240bba06b769aa8c94f30c2f83a3ed4b35b6d718f9f83deec87/mfbatch-0.4.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-08 05:30:27",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "iluvcapra",
"github_project": "mfbatch",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "mfbatch"
}