{ "info": { "author": "Thomas Scholtes", "author_email": "thomas-scholtes@gmx.de", "bugtrack_url": null, "classifiers": [ "Environment :: Console", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Multimedia :: Sound/Audio", "Topic :: Multimedia :: Sound/Audio :: Players :: MP3" ], "description": "beets-alternatives\n==================\n\n[![Build Status](https://travis-ci.org/geigerzaehler/beets-alternatives.svg?branch=master)](https://travis-ci.org/geigerzaehler/beets-alternatives)\n[![Coverage Status](https://coveralls.io/repos/github/geigerzaehler/beets-alternatives/badge.svg?branch=master)](https://coveralls.io/github/geigerzaehler/beets-alternatives?branch=master)\n\nYou want to manage multiple versions of your audio files with beets?\nYour favorite iPlayer has limited space and does not support Ogg Vorbis? You\nwant to keep lossless versions on a large external drive? You want to\nsymlink your audio to other locations?\n\nWith this [beets][beets-docs] plugin every file in you music library have\nmultiple alternate versions in separate locations.\n\nGetting Started\n---------------\n\nYou will also need at least version 1.4.7 of beets.\n\n```\npip install --upgrade beets>=1.4.7 beets-alternatives\n```\n\nThen, [enable the plugin][using plugins]. You may use the `beet config --edit`\ncommand to add the *alternatives* plugin to the configuration.\n\n```yaml\nplugins:\n- ...\n- alternatives\n```\n\nNow, you can get rolling with one of the use cases below.\n\n### External Files\n\nSuppose your favorite portable player only supports MP3 and MP4, has\nlimited disk space and is mounted at `/player`. Instead of selecting\nits content manually and using the `convert` plugin to transcode it, you\nwant to sync it automatically. First we give this external collection\nthe name \u2018myplayer\u2019 and start configuring beets.\n\n```yaml\nalternatives:\n myplayer:\n directory: /player\n paths:\n default: $album/$title\n formats: aac mp3\n query: \"onplayer:true\"\n removable: true\n```\n\nThe first two options determine the location of the external files and\ncorrespond to the global [`directory`][config-directory] and\n[`paths`][config-paths] settings. The `format` option specifies the\nformats we transcode the files to (more on that below). Finally, the\n`query` option tells the plugin which files you want to put in the\nexternal location. The value is a [query string][] as used for the\nbeets command line. In our case we use a flexible attribute to make the\nselection transparent.\n\nLet\u2019s add some files to our selection by setting the flexible attribute\nfrom the `query` option. (Since we use boolean values for the\n\u2018onplayer\u2019 field it might be a good idea to set the type of this field\nto `bool` using the *types* plugin)\n\n```\n$ beet modify onplayer=true artist:Bach\n```\n\nThe configured query also matches all tracks that are part of an album\nwhere the `onplayer` attribute is \u2018true\u2019. We could also use\n\n```\n$ beet modify -a onplayer=true albumartist:Bach\n```\n\nWe then tell beets to create the external files.\n\n```\n$ beet alt update myplayer\nCollection at '/player' does not exists. Maybe you forgot to mount it.\nDo you want to create the collection? (y/N)\n```\n\nThe question makes sure that you don\u2019t recreate a external collection\nif the device is not mounted. Since this is our first go, we answer the\nquestion with yes.\n\nThe command will copy all files with the artist \u2018Bach\u2019 and format\neither \u2018AAC\u2019 or \u2018MP3\u2019 to the `/player` directory. All other formats\nwill be transcodec to the \u2018AAC\u2019 format unsing the [*convert* plugin][].\nThe transcoding process can be configured through [*convert\u2019s*\nconfiguration][convert config].\n\nIf you update some tracks in your main collection, the `alt update`\ncommand will propagate the changes to your external collection. Since\nwe don\u2019t need to convert the files but just update the tags, this will\nbe much faster the second time.\n\n```\n$ beet modify composer=\"Johann Sebastian Bach\" artist:Bach\n$ beet alt update myplayer\n```\n\nAfter going for a run you mitght realize that Bach is probably not the\nright thing to work out to. So you decide to put Beethoven on your\nplayer.\n\n```\n$ beet modify onplayer! artist:Bach\n$ beet modify onplayer=true artist:Beethoven\n$ beet alt update myplayer\n```\n\nThis removes all Bach tracks from the player and adds Beethoven\u2019s.\n\n### Symlink Views\n\nInstead of copying and converting files this plugin can also create\nsymbolic links to the files in your library. For example you want to\nhave a directory containing all music sorted by year and album.\n\n```yaml\ndirectory: /music\npaths:\n default: $artist/$album/$title\n\nalternatives:\n by-year:\n directory: by-year\n paths:\n default: $year/$album/$title\n formats: link\n```\n\nThe first thing to note here is the `link` format. Instead of\nconverting the files this tells the plugin to create symbolic links to\nthe original audio file. We also note that the directory is a relative\npath: it will be resolved with respect to the global `directory`\noption. We could also omit the directory configuration as it defaults\nto the collection\u2019s name. Finally, we omitted the `query` option. This\nmeans that we want to create symlinks for all files. Of course you can\nstill add a query to select only parts of your collection.\n\nThe `beet alt update by-year` command will now create the symlinks. For\nexample\n\n```\n/music/by-year/1982/Thriller/Beat It.mp3\n-> /music/Michael Jackson/Thriller/Beat It.mp3\n```\n\nYou can also specify if you want absolute symlinks (default) or relative ones\nwith `link_type`. The option `link_type` must be `absolute` or `relative`\n\n```yaml\nalternatives:\n by-year:\n directory: by-year\n paths:\n default: $year/$album/$title\n formats: link\n link_type: relative\n```\n\nWith this config, the `beet alt update by-year` command will create relative symlinks. E.g:\n```\n/music/by-year/1982/Thriller/Beat It.mp3\n-> ../../../Michael Jackson/Thriller/Beat It.mp3\n```\n\nNow, if you move the `/music/` folder to another location, the links\nwill continue working\n\nCLI Reference\n-------------\n\n```\nbeet alt update [--create|--no-create] NAME\n```\n\nUpdates the external collection configured under `alternatives.NAME`.\n\n* Add missing files. Convert them to the configured format or copy\n them.\n\n* Remove files that don\u2019t match the query but are still in the\n external collection\n\n* Move files to the path determined from the `paths` configuration.\n\n* Update tags if the modification time of the external file is older\n than that of the source file from the library.\n\nThe command accepts the following option.\n\n* **`--[no-]create`** If the `removable` configuration option\n is set and the external base directory does not exist, then the\n command will ask you to confirm the creation of the external\n collection. These options specify the answer as a cli option.\n\nConfiguration\n-------------\n\nAn external collection is configured as a name-settings-pair under the\n`alternatives` configuration. The name is used to reference the\ncollection from the command line. The settings is a map of the\nfollowing settings.\n\n* **`directory`** The root directory to store the external files under.\n Relative paths are resolved with respect to the global `directory`\n configuration. If omitted it defaults to the name of the collection\n and is therefore relative to the library directory. (optional)\n\n* **`paths`** Path templates for audio files under `directory`. Configured\n like the [global paths option][config-paths] and defaults to it if\n not given. (optional)\n\n* **`query`** A [query string][] that determine which tracks belong to the\n collection. A track belongs to the collection if itself or the album\n it is part of matches the query. To match all items, specify an empty\n string. (required)\n\n* **`formats`** A list of space separated strings that determine the\n audio file formats in the external collection. If the \u2018format\u2019 field\n of a track is included in the list, the file is copied. Otherwise,\n the file is transcoded to the first format in the list. The name of\n the first format must correpond to a key in the\n [`convert.formats`][convert plugin] configuration. This configuration\n controls the transcoding process.\n\n The special format \u2018link\u2019 is used to create symbolic links instead of\n transcoding the file. It can not be combined with other formats.\n\n By default no transcoding is done.\n\n* **`removable`** If this is `true` (the default) and `directory` does\n not exist, the `update` command will ask you to confirm the creation\n of the external collection. (optional)\n\n* **`link_type`** Can be `absolute` (default) or `relative`. If\n **`formats`** is `link`, it sets the type of links to create. For \n differences between link types and examples see [Symlink Views](#symlink-views).\n\n\nFeature Requests\n----------------\n\nIf you have an idea or a use case this plugin is missing, feel free to\n[open an issue](https://github.com/geigerzaehler/beets-alternatives/issues/new).\n\nThe following is a list of things I might add in the feature.\n\n* Symbolic links for each artist in a multiple artists release (see the\n [beets issue][beets-issue-split-symlinks])\n\n\nLicense\n-------\n\nCopyright (c) 2014 Thomas Scholtes.\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"), to\ndeal in the Software without restriction, including without limitation the\nrights to use, copy, modify, merge, publish, distribute, sublicense, and/or\nsell copies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n\n[beets-docs]: https://beets.readthedocs.io/en/latest/index.html\n[beets-issue-split-symlinks]: https://github.com/sampsyo/beets/issues/153\n[config-directory]: http://beets.readthedocs.org/en/latest/reference/config.html#directory\n[config-paths]: http://beets.readthedocs.org/en/latest/reference/config.html#path-format-configuration\n[convert config]: http://beets.readthedocs.org/en/latest/plugins/convert.html#configuring-the-transcoding-command\n[convert plugin]: http://beets.readthedocs.org/en/latest/plugins/convert.html\n[query string]: http://beets.readthedocs.org/en/latest/reference/query.html\n[using plugins]: http://beets.readthedocs.org/en/latest/plugins/index.html#using-plugins\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://www.github.com/geigerzaehler/beets-alternatives", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "beets-alternatives", "package_url": "https://pypi.org/project/beets-alternatives/", "platform": "ALL", "project_url": "https://pypi.org/project/beets-alternatives/", "project_urls": { "Homepage": "http://www.github.com/geigerzaehler/beets-alternatives" }, "release_url": "https://pypi.org/project/beets-alternatives/0.10.1/", "requires_dist": [ "beets (>=1.4.7)", "six", "futures ; python_version < \"3\"" ], "requires_python": "", "summary": "beets plugin to manage multiple files", "version": "0.10.1" }, "last_serial": 5852353, "releases": { "0.10.0": [ { "comment_text": "", "digests": { "md5": "3b4422397fa81039b4e3723f3a3158f1", "sha256": "ef984bccd287b900576bdaf15c62269a21dcef4cdeec2ea8609d3481db804b88" }, "downloads": -1, "filename": "beets_alternatives-0.10.0-py3-none-any.whl", "has_sig": false, "md5_digest": "3b4422397fa81039b4e3723f3a3158f1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10021, "upload_time": "2019-08-25T10:45:40", "url": "https://files.pythonhosted.org/packages/1a/30/89f2fab0e664fb7661e71f75fde8ced4ca53a1959897b5cd545e78799c92/beets_alternatives-0.10.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6b933be706bc4e3cc7f0aea703fb1c5a", "sha256": "7d74df4b3490b60ecfef76c8692123016e58d3e5b2fb158df0b174f69b000f52" }, "downloads": -1, "filename": "beets-alternatives-0.10.0.tar.gz", "has_sig": false, "md5_digest": "6b933be706bc4e3cc7f0aea703fb1c5a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9621, "upload_time": "2019-08-25T10:45:41", "url": "https://files.pythonhosted.org/packages/db/3c/2529311291f9e04ae02a7bf1e6b93ed894ffacdf8dab4a32a2ed7b6062e1/beets-alternatives-0.10.0.tar.gz" } ], "0.10.1": [ { "comment_text": "", "digests": { "md5": "ffae8de11e0cc863cb6d4fa013266357", "sha256": "3ce4b3ea19c49db08e842cfbbfb24143e1ef92ce8f9423d4689fc349fc354ee7" }, "downloads": -1, "filename": "beets_alternatives-0.10.1-py3-none-any.whl", "has_sig": false, "md5_digest": "ffae8de11e0cc863cb6d4fa013266357", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10127, "upload_time": "2019-09-18T20:21:24", "url": "https://files.pythonhosted.org/packages/ac/b5/e11fc20c9798d6c43d3a081e313a4d1280f6a6accf408e1783d26ede4d30/beets_alternatives-0.10.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8346c06888ddb343a712263baa1340a0", "sha256": "45a5f777bfd75917162ab69a8153b9730f131c5699aaa30ce8f02190bf81dba7" }, "downloads": -1, "filename": "beets-alternatives-0.10.1.tar.gz", "has_sig": false, "md5_digest": "8346c06888ddb343a712263baa1340a0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9733, "upload_time": "2019-09-18T20:21:26", "url": "https://files.pythonhosted.org/packages/89/f3/be33d66993502cdf17dc7397cb0d8c12d088bd8fd9043cad1381f4caacbe/beets-alternatives-0.10.1.tar.gz" } ], "0.9.0": [ { "comment_text": "", "digests": { "md5": "0288a382facbf8c3372299a16722e293", "sha256": "617c30b5a2416ddc21900c6a14390a8cb0cd4336abbf80e3a0be243d4c472aaa" }, "downloads": -1, "filename": "beets_alternatives-0.9.0-py3-none-any.whl", "has_sig": false, "md5_digest": "0288a382facbf8c3372299a16722e293", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9577, "upload_time": "2018-11-24T10:07:29", "url": "https://files.pythonhosted.org/packages/0b/35/246e9858ff7908e4d7460b1ac5225dc46d8728c2e98b33afc1ecba3b590f/beets_alternatives-0.9.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1123fb9ac0119949ecfa8fcfd9480a08", "sha256": "73a0a03562a32ea274a419d707309d4410caeaf3c3e160357ca6f4101f7866a5" }, "downloads": -1, "filename": "beets-alternatives-0.9.0.tar.gz", "has_sig": false, "md5_digest": "1123fb9ac0119949ecfa8fcfd9480a08", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9157, "upload_time": "2018-11-24T10:07:31", "url": "https://files.pythonhosted.org/packages/79/42/78a5a24ea5792364412c901f973899c4a0f258113957ce0e4fbafa9ab8d7/beets-alternatives-0.9.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ffae8de11e0cc863cb6d4fa013266357", "sha256": "3ce4b3ea19c49db08e842cfbbfb24143e1ef92ce8f9423d4689fc349fc354ee7" }, "downloads": -1, "filename": "beets_alternatives-0.10.1-py3-none-any.whl", "has_sig": false, "md5_digest": "ffae8de11e0cc863cb6d4fa013266357", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10127, "upload_time": "2019-09-18T20:21:24", "url": "https://files.pythonhosted.org/packages/ac/b5/e11fc20c9798d6c43d3a081e313a4d1280f6a6accf408e1783d26ede4d30/beets_alternatives-0.10.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8346c06888ddb343a712263baa1340a0", "sha256": "45a5f777bfd75917162ab69a8153b9730f131c5699aaa30ce8f02190bf81dba7" }, "downloads": -1, "filename": "beets-alternatives-0.10.1.tar.gz", "has_sig": false, "md5_digest": "8346c06888ddb343a712263baa1340a0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9733, "upload_time": "2019-09-18T20:21:26", "url": "https://files.pythonhosted.org/packages/89/f3/be33d66993502cdf17dc7397cb0d8c12d088bd8fd9043cad1381f4caacbe/beets-alternatives-0.10.1.tar.gz" } ] }