mfbatch


Namemfbatch JSON
Version 0.5.0 PyPI version JSON
download
home_pagehttps://github.com/iluvcapra/mfbatch
SummaryMetaFlac batch editor
upload_time2024-10-16 21:13:09
maintainerNone
docs_urlNone
authorJamie Hardt
requires_python<4.0,>=3.9
licenseMIT
keywords flac metadata audio multimedia console scripting
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![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/39/24/f79351fcced43947798049656a089b0dc0b6d22f9285b6df75b3e559fd4b/mfbatch-0.5.0.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.5.0",
    "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": "8e21a886b72075de720dfc2d69a5243c7fdb3da364b96206180f29fbb20e8669",
                "md5": "f06a228e296a4f2881453e4352f98497",
                "sha256": "086a78290903201b13ec4a1f6d2514d54eac343c85e44c90f5f24b8cba052613"
            },
            "downloads": -1,
            "filename": "mfbatch-0.5.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f06a228e296a4f2881453e4352f98497",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 10250,
            "upload_time": "2024-10-16T21:13:06",
            "upload_time_iso_8601": "2024-10-16T21:13:06.883624Z",
            "url": "https://files.pythonhosted.org/packages/8e/21/a886b72075de720dfc2d69a5243c7fdb3da364b96206180f29fbb20e8669/mfbatch-0.5.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3924f79351fcced43947798049656a089b0dc0b6d22f9285b6df75b3e559fd4b",
                "md5": "954ae0332031c2dda8d4839244084c18",
                "sha256": "c3975c6e21be0848f97b1bf96b620dc49a1a93e8f4237145edf8e14ba362133d"
            },
            "downloads": -1,
            "filename": "mfbatch-0.5.0.tar.gz",
            "has_sig": false,
            "md5_digest": "954ae0332031c2dda8d4839244084c18",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 9832,
            "upload_time": "2024-10-16T21:13:09",
            "upload_time_iso_8601": "2024-10-16T21:13:09.272135Z",
            "url": "https://files.pythonhosted.org/packages/39/24/f79351fcced43947798049656a089b0dc0b6d22f9285b6df75b3e559fd4b/mfbatch-0.5.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-16 21:13:09",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "iluvcapra",
    "github_project": "mfbatch",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "mfbatch"
}
        
Elapsed time: 1.20844s