audiobook-tags


Nameaudiobook-tags JSON
Version 1.2.9 PyPI version JSON
download
home_pageNone
SummaryFix mp3 tags to use in iTunes/iPhone audiobooks.
upload_time2024-03-31 05:31:06
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseCopyright (c) 2024 Andrey Sorokin <andrey@sorokin.engineer> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords audiobook iphone itunes mp3 tags
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![Build Status](https://github.com/andgineer/itunes-audiobook-from-mp3/workflows/ci/badge.svg)](https://github.com/andgineer/itunes-audiobook-from-mp3/actions)
[![Coverage](https://raw.githubusercontent.com/andgineer/itunes-audiobook-from-mp3/python-coverage-comment-action-data/badge.svg)](https://htmlpreview.github.io/?https://github.com/andgineer/itunes-audiobook-from-mp3/blob/python-coverage-comment-action-data/htmlcov/index.html)
# Audiobooks from mp3 with broken tags

Fix mp3 files tags to convert them into iTunes/iPhone audiobooks..

- Fixes sort order.
- Supports messed encoding like cyrillic Win1251.

Details in [my blog's article](https://sorokin.engineer/posts/en/itunes_audiobook_from_mp3.html).

## Installation
Install using [`pipx`](https://pypa.github.io/pipx/) for isolated environments, which prevents interference
with your system's Python packages.

Once `pipx` is set up:

```bash
pipx install audiobook-tags
```

## Command Line Interface

## Usage
    audiobook-tags [-h] [--encoding ENCODING] [--extension EXTENSION] [--set-tag [SET_TAG ...]] [--track-num TRACK_NUM] [--title-prefix TITLE_PREFIX] [--dry] [folder]

    Fixes mp3 tags for iOS audiobooks.

    positional arguments:
      folder                Folder to process. By default current folder.

    options:
      -h, --help            show this help message and exit
      --suffix SUFFIX, -s SUFFIX
                            Files suffix. By default mp3
      --encoding ENCODING, -e ENCODING
                            mp3 tags encoding. "none" if you do not need mp3 tags encoding fix. By default "cp1251".
      --tag [SET_TAG ...], -t [SET_TAG ...]
                            Change mp3 tag to specified string. Format "tag-name/tag-value".
      --num TRACK_NUM, -n TRACK_NUM
                            Sort files and set mp3 tag `track_num`:
                              --num="name" - sort by names;
                              --num="tag-<TAG>" - sort by mp3 tag with name <TAG>.
                                For example to sort by title tag use --num="tag-title".
      --prefix TITLE_PREFIX, -p TITLE_PREFIX
                            Add prefix to title tags. By default `{track:04} - ` if `--num` and no prefix if not.
      --dry, -d             Dry run without changing files.

## Example:

    audiobook-tags --tag="album_artist/Юрий Заборовский (Ардис)" --num="name" --prefix=""

- converts all `mp3` files in current folder and subfolders
- fix encoding supposing that original encoding was `Windows 1251`
- change tag album artist.
- set `track_num` mp3 tag to file number as ordered by file name.
  But do not add the track number to the title (`--prefix="""`).

# Development

### OS Dependencies

#### MacOS

  brew update
  brew install libmagic

### Python dependencies

Note the dot before `./activate.sh`:

  . ./activate.sh

We use [eyeD3](https://eyed3.readthedocs.io/en/latest/) to work with mp3 tags.

## Coverage report
* [Codecov](https://app.codecov.io/gh/andgineer/itunes-audiobook-from-mp3/tree/master/src%2Faudiobook_tags)
* [Coveralls](https://coveralls.io/github/andgineer/itunes-audiobook-from-mp3)

> Created with cookiecutter using [template](https://github.com/andgineer/cookiecutter-python-package)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "audiobook-tags",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "audiobook, iphone, itunes, mp3, tags",
    "author": null,
    "author_email": "Andrey Sorokin <andrey@sorokin.engineer>",
    "download_url": "https://files.pythonhosted.org/packages/2a/cc/ce329f16c226d3cf2ce580b4c27cc2b88258d2fbf5806a333ec8997e2123/audiobook_tags-1.2.9.tar.gz",
    "platform": null,
    "description": "\ufeff[![Build Status](https://github.com/andgineer/itunes-audiobook-from-mp3/workflows/ci/badge.svg)](https://github.com/andgineer/itunes-audiobook-from-mp3/actions)\n[![Coverage](https://raw.githubusercontent.com/andgineer/itunes-audiobook-from-mp3/python-coverage-comment-action-data/badge.svg)](https://htmlpreview.github.io/?https://github.com/andgineer/itunes-audiobook-from-mp3/blob/python-coverage-comment-action-data/htmlcov/index.html)\n# Audiobooks from mp3 with broken tags\n\nFix mp3 files tags to convert them into iTunes/iPhone audiobooks..\n\n- Fixes sort order.\n- Supports messed encoding like cyrillic Win1251.\n\nDetails in [my blog's article](https://sorokin.engineer/posts/en/itunes_audiobook_from_mp3.html).\n\n## Installation\nInstall using [`pipx`](https://pypa.github.io/pipx/) for isolated environments, which prevents interference\nwith your system's Python packages.\n\nOnce `pipx` is set up:\n\n```bash\npipx install audiobook-tags\n```\n\n## Command Line Interface\n\n## Usage\n    audiobook-tags [-h] [--encoding ENCODING] [--extension EXTENSION] [--set-tag [SET_TAG ...]] [--track-num TRACK_NUM] [--title-prefix TITLE_PREFIX] [--dry] [folder]\n\n    Fixes mp3 tags for iOS audiobooks.\n\n    positional arguments:\n      folder                Folder to process. By default current folder.\n\n    options:\n      -h, --help            show this help message and exit\n      --suffix SUFFIX, -s SUFFIX\n                            Files suffix. By default mp3\n      --encoding ENCODING, -e ENCODING\n                            mp3 tags encoding. \"none\" if you do not need mp3 tags encoding fix. By default \"cp1251\".\n      --tag [SET_TAG ...], -t [SET_TAG ...]\n                            Change mp3 tag to specified string. Format \"tag-name/tag-value\".\n      --num TRACK_NUM, -n TRACK_NUM\n                            Sort files and set mp3 tag `track_num`:\n                              --num=\"name\" - sort by names;\n                              --num=\"tag-<TAG>\" - sort by mp3 tag with name <TAG>.\n                                For example to sort by title tag use --num=\"tag-title\".\n      --prefix TITLE_PREFIX, -p TITLE_PREFIX\n                            Add prefix to title tags. By default `{track:04} - ` if `--num` and no prefix if not.\n      --dry, -d             Dry run without changing files.\n\n## Example:\n\n    audiobook-tags --tag=\"album_artist/\u042e\u0440\u0438\u0439 \u0417\u0430\u0431\u043e\u0440\u043e\u0432\u0441\u043a\u0438\u0439 (\u0410\u0440\u0434\u0438\u0441)\" --num=\"name\" --prefix=\"\"\n\n- converts all `mp3` files in current folder and subfolders\n- fix encoding supposing that original encoding was `Windows 1251`\n- change tag album artist.\n- set `track_num` mp3 tag to file number as ordered by file name.\n  But do not add the track number to the title (`--prefix=\"\"\"`).\n\n# Development\n\n### OS Dependencies\n\n#### MacOS\n\n  brew update\n  brew install libmagic\n\n### Python dependencies\n\nNote the dot before `./activate.sh`:\n\n  . ./activate.sh\n\nWe use [eyeD3](https://eyed3.readthedocs.io/en/latest/) to work with mp3 tags.\n\n## Coverage report\n* [Codecov](https://app.codecov.io/gh/andgineer/itunes-audiobook-from-mp3/tree/master/src%2Faudiobook_tags)\n* [Coveralls](https://coveralls.io/github/andgineer/itunes-audiobook-from-mp3)\n\n> Created with cookiecutter using [template](https://github.com/andgineer/cookiecutter-python-package)\n",
    "bugtrack_url": null,
    "license": "Copyright (c) 2024 Andrey Sorokin <andrey@sorokin.engineer>  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \u201cSoftware\u201d), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \u201cAS IS\u201d, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "Fix mp3 tags to use in iTunes/iPhone audiobooks.",
    "version": "1.2.9",
    "project_urls": {
        "Documentation": "https://andgineer.github.io/audiobook-tags/",
        "Homepage": "https://andgineer.github.io/audiobook-tags/"
    },
    "split_keywords": [
        "audiobook",
        " iphone",
        " itunes",
        " mp3",
        " tags"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f75140e9c55cf010126a440ae9e6d8e367fcb18556bf75dd5f75609fde4f3c18",
                "md5": "c5e4e8499f9f1fedbbb0cead54cce0b4",
                "sha256": "1487b84208a140b1b9d62b08141def3afab6229c985893360ce4fa6bdae64203"
            },
            "downloads": -1,
            "filename": "audiobook_tags-1.2.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c5e4e8499f9f1fedbbb0cead54cce0b4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 7115,
            "upload_time": "2024-03-31T05:31:05",
            "upload_time_iso_8601": "2024-03-31T05:31:05.060758Z",
            "url": "https://files.pythonhosted.org/packages/f7/51/40e9c55cf010126a440ae9e6d8e367fcb18556bf75dd5f75609fde4f3c18/audiobook_tags-1.2.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2accce329f16c226d3cf2ce580b4c27cc2b88258d2fbf5806a333ec8997e2123",
                "md5": "ceff2504118cec286eecf24483a1f849",
                "sha256": "cbfc7c2aa0d71f5426b48f32a9afd1dc4485edff73a694d0142e884e6da9db97"
            },
            "downloads": -1,
            "filename": "audiobook_tags-1.2.9.tar.gz",
            "has_sig": false,
            "md5_digest": "ceff2504118cec286eecf24483a1f849",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 7113990,
            "upload_time": "2024-03-31T05:31:06",
            "upload_time_iso_8601": "2024-03-31T05:31:06.958960Z",
            "url": "https://files.pythonhosted.org/packages/2a/cc/ce329f16c226d3cf2ce580b4c27cc2b88258d2fbf5806a333ec8997e2123/audiobook_tags-1.2.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-31 05:31:06",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "audiobook-tags"
}
        
Elapsed time: 0.21553s