retag-opus


Nameretag-opus JSON
Version 0.4.1 PyPI version JSON
download
home_page
SummaryAn app to tag music files downloaded from Youtube with all the information available in the Youtube description.
upload_time2024-01-28 15:57:03
maintainer
docs_urlNone
authorSimon Bengtsson
requires_python>=3.10,<4.0
licenseGPL-3.0-or-later
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Retag Opus

Say you have a music file in opus format, with a tag called
`description` that holds data about the music in the format used by
YouTube's ContentID. This script will help you parse that tag and put
the relevant data into the tags where it actually belongs, such as
`title`, `artist`, and `album`.

# Dependencies

Retag requires
[simple-term-menu](https://github.com/IngoMeyer441/simple-term-menu) to
be installed.

# Usage

Run the script like so:

```console
$ python3 retag --directory /path/to/directory/with/your/opus/files.opus
```

There is also a help (`-h`) flag:

```console
$ retag -h
usage: main.py [-h] [-d DIR] [-v] [-V]

options:
-h, --help            show this help message and exit
-s {bash,zsh,tcsh}, --print-completion {bash,zsh,tcsh}
                      print shell completion script
-a, --all             Even if there is no YouTube description, suggest improving existing tags
-d DIR, --directory DIR
                      directory in which the files to be retagged are located
-V, --version         show program's version number and exit
```

Retag will go through the opus file in the root of the directory you
provided and try to parse tag information from the YouTube description
if it is in the tags and from the original tags (e.g. adding another
artist if the title indicates a featured artist). It might look like
this:

![Retag Opus terminal example](screenshot_1.png)

Purple text indicates that the tag comes from the YouTube description.
Blue indicates that the tag existed in the metadata since before. Yellow
indicates that the tag comes from interpreting one of the original tags,
and green indicates that the tag has been interpreted from one of the
new tags taken from the YouTube description.

As you go on adjusting tags, they turn green for indicating that you're
done adjusting them. In the end, some tags may stay blue, indicating
that you have selected the original tag or that no new data is
available. Here is an example of what it can look like:

![Retag Opus final view example](screenshot_2.png)

As you can see, you can remove tags, which will make them print
"[Removed]" in red text. In the actual song metadata, they will just be
removed.

## Configuration

You can configure tags that should be deleted. There are two ways you can
configure these. You can either say an exact tag name that should be deleted –
that is, the name of the tag itself, not its value. You can also specify a regex
that, if fully matching any value in a tag, will result in that tag being
deleted.

You specify this information in the Retag-Opus configuration file which is
`retag.toml` in your `XDG_CONFIG_HOME` directory, so usually
`~/.config/retag.toml`. Here is an example:

```toml
tags_to_delete = [
  "language",
]
strings_to_delete_tags_based_on = [
  "delete_exactly_this",
  ".*delete_any_partial_match.*",
]
```

This will delete the `language` tag, any tag containing the exact value
`delete_exactly_this` but not `delete_exactly_this_other_thing`, and also any
tag that matches the last regex, such as `test_delete_any_partial_match_test`.

# Project status

The project is still under development. The most common tags can be
parsed but there are many more which will just be ignored. Work needs to
be done in usability.

Latest workflow status:

![Check pipeline status badge](https://github.com/gevhaz/Retag-Opus/actions/workflows/check.yml/badge.svg)
![Deploy pipeline status badge](https://github.com/gevhaz/Retag-Opus/actions/workflows/deploy.yml/badge.svg)

Latest version:

![Latest PyPI version tag badge](https://img.shields.io/pypi/v/retag-opus)
![Latest patch version tag badge](https://img.shields.io/github/v/tag/gevhaz/retag-opus)

Acitivy since last release:

![Commits since latest version badge](https://img.shields.io/github/commits-since/gevhaz/retag-opus/latest)


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "retag-opus",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Simon Bengtsson",
    "author_email": "gevhaz@tutanota.com",
    "download_url": "https://files.pythonhosted.org/packages/12/72/1ac16c07e1311da78c2e3862ca38a10d850f795a92935bea20de58eb530f/retag_opus-0.4.1.tar.gz",
    "platform": null,
    "description": "# Retag Opus\n\nSay you have a music file in opus format, with a tag called\n`description` that holds data about the music in the format used by\nYouTube's ContentID. This script will help you parse that tag and put\nthe relevant data into the tags where it actually belongs, such as\n`title`, `artist`, and `album`.\n\n# Dependencies\n\nRetag requires\n[simple-term-menu](https://github.com/IngoMeyer441/simple-term-menu) to\nbe installed.\n\n# Usage\n\nRun the script like so:\n\n```console\n$ python3 retag --directory /path/to/directory/with/your/opus/files.opus\n```\n\nThere is also a help (`-h`) flag:\n\n```console\n$ retag -h\nusage: main.py [-h] [-d DIR] [-v] [-V]\n\noptions:\n-h, --help            show this help message and exit\n-s {bash,zsh,tcsh}, --print-completion {bash,zsh,tcsh}\n                      print shell completion script\n-a, --all             Even if there is no YouTube description, suggest improving existing tags\n-d DIR, --directory DIR\n                      directory in which the files to be retagged are located\n-V, --version         show program's version number and exit\n```\n\nRetag will go through the opus file in the root of the directory you\nprovided and try to parse tag information from the YouTube description\nif it is in the tags and from the original tags (e.g. adding another\nartist if the title indicates a featured artist). It might look like\nthis:\n\n![Retag Opus terminal example](screenshot_1.png)\n\nPurple text indicates that the tag comes from the YouTube description.\nBlue indicates that the tag existed in the metadata since before. Yellow\nindicates that the tag comes from interpreting one of the original tags,\nand green indicates that the tag has been interpreted from one of the\nnew tags taken from the YouTube description.\n\nAs you go on adjusting tags, they turn green for indicating that you're\ndone adjusting them. In the end, some tags may stay blue, indicating\nthat you have selected the original tag or that no new data is\navailable. Here is an example of what it can look like:\n\n![Retag Opus final view example](screenshot_2.png)\n\nAs you can see, you can remove tags, which will make them print\n\"[Removed]\" in red text. In the actual song metadata, they will just be\nremoved.\n\n## Configuration\n\nYou can configure tags that should be deleted. There are two ways you can\nconfigure these. You can either say an exact tag name that should be deleted \u2013\nthat is, the name of the tag itself, not its value. You can also specify a regex\nthat, if fully matching any value in a tag, will result in that tag being\ndeleted.\n\nYou specify this information in the Retag-Opus configuration file which is\n`retag.toml` in your `XDG_CONFIG_HOME` directory, so usually\n`~/.config/retag.toml`. Here is an example:\n\n```toml\ntags_to_delete = [\n  \"language\",\n]\nstrings_to_delete_tags_based_on = [\n  \"delete_exactly_this\",\n  \".*delete_any_partial_match.*\",\n]\n```\n\nThis will delete the `language` tag, any tag containing the exact value\n`delete_exactly_this` but not `delete_exactly_this_other_thing`, and also any\ntag that matches the last regex, such as `test_delete_any_partial_match_test`.\n\n# Project status\n\nThe project is still under development. The most common tags can be\nparsed but there are many more which will just be ignored. Work needs to\nbe done in usability.\n\nLatest workflow status:\n\n![Check pipeline status badge](https://github.com/gevhaz/Retag-Opus/actions/workflows/check.yml/badge.svg)\n![Deploy pipeline status badge](https://github.com/gevhaz/Retag-Opus/actions/workflows/deploy.yml/badge.svg)\n\nLatest version:\n\n![Latest PyPI version tag badge](https://img.shields.io/pypi/v/retag-opus)\n![Latest patch version tag badge](https://img.shields.io/github/v/tag/gevhaz/retag-opus)\n\nAcitivy since last release:\n\n![Commits since latest version badge](https://img.shields.io/github/commits-since/gevhaz/retag-opus/latest)\n\n",
    "bugtrack_url": null,
    "license": "GPL-3.0-or-later",
    "summary": "An app to tag music files downloaded from Youtube with all the information available in the Youtube description.",
    "version": "0.4.1",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ce00c9c95562bbf1de453b66fda7f2d08183a506ea7a67f1c15115b876fb54bb",
                "md5": "90f0465b3982cb3ba710251782d93af6",
                "sha256": "c89d70c9c36db0cc4e043c9f866027c68190362fd441571d3bb706a25ca8c971"
            },
            "downloads": -1,
            "filename": "retag_opus-0.4.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "90f0465b3982cb3ba710251782d93af6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10,<4.0",
            "size": 31986,
            "upload_time": "2024-01-28T15:57:02",
            "upload_time_iso_8601": "2024-01-28T15:57:02.699252Z",
            "url": "https://files.pythonhosted.org/packages/ce/00/c9c95562bbf1de453b66fda7f2d08183a506ea7a67f1c15115b876fb54bb/retag_opus-0.4.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "12721ac16c07e1311da78c2e3862ca38a10d850f795a92935bea20de58eb530f",
                "md5": "ed2f527982c591a5c3726865c0999314",
                "sha256": "3fc8a8168575a59af44c1a00b1d5ccdf0ba5b5bdc62137b3443ac3e692b6ae02"
            },
            "downloads": -1,
            "filename": "retag_opus-0.4.1.tar.gz",
            "has_sig": false,
            "md5_digest": "ed2f527982c591a5c3726865c0999314",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10,<4.0",
            "size": 29729,
            "upload_time": "2024-01-28T15:57:03",
            "upload_time_iso_8601": "2024-01-28T15:57:03.923460Z",
            "url": "https://files.pythonhosted.org/packages/12/72/1ac16c07e1311da78c2e3862ca38a10d850f795a92935bea20de58eb530f/retag_opus-0.4.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-28 15:57:03",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "retag-opus"
}
        
Elapsed time: 0.17777s