{"id":16096367,"url":"https://github.com/sio/musicbatch","last_synced_at":"2025-04-05T20:29:35.965Z","repository":{"id":101312910,"uuid":"178884074","full_name":"sio/musicbatch","owner":"sio","description":"Batch processing tools for music files","archived":false,"fork":false,"pushed_at":"2019-11-06T11:32:49.000Z","size":128,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-11T20:49:54.750Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-01T14:44:06.000Z","updated_at":"2019-11-06T11:32:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"ff9a7ef4-0ee5-4be7-b2f6-55092dc62029","html_url":"https://github.com/sio/musicbatch","commit_stats":{"total_commits":172,"total_committers":1,"mean_commits":172.0,"dds":0.0,"last_synced_commit":"0a0b417b9f3cc860e152a9ae6d7b4d9e6481befb"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sio%2Fmusicbatch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sio%2Fmusicbatch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sio%2Fmusicbatch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sio%2Fmusicbatch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sio","download_url":"https://codeload.github.com/sio/musicbatch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247398110,"owners_count":20932667,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-09T17:13:48.731Z","updated_at":"2025-04-05T20:29:35.927Z","avatar_url":"https://github.com/sio.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Batch processing tools for music files\n\n## Project status\n\nIn development, but already usable. Breaking changes are to be expected.\n\n\n\n## Overview\n\nThis repo provides command line tools and Python interfaces for batch\nprocessing large collections of music files:\n\n- Transcoding the whole library (or parts of it) to another format, e.g. for\n  exporting to a portable media player\n- Fetching and displaying lyrics for music files\n- Generating and managing album metadata with [HODS files](https://hods.ml/schemas/)\n\n\n## Installation\n\n1. Install Python package: `pip install\n\"https://github.com/sio/musicbatch/tarball/master\"`\n\n2. Install [FFmpeg](http://ffmpeg.org) - it's used as audio encoding backend.\n\n\n\n## Usage\n\nThis package provides command line interface and Python modules for\nincorporating into your scripts.\n\nCommand line interface may be accessed via `music` command or by executing the\ntop-level module directly: `python -m musicbatch`. Main CLI entry point\nresembles git behavior - it relays all work to one of subcommands:\n\n- lyrics\n- metadata\n- transcoder\n\n### lyrics\n\n```\nusage: music lyrics [-h] [--database FILE] [--scan-library DIR]\n                    [--retry-scheduled]\n                    [ARTIST] [TITLE]\n\nInteract with local lyrics database. Populate the database with lyrics from\nweb sources for all songs in a given directory or return the text of a single\nsong if ARTIST and TITLE are specified.\n\npositional arguments:\n  ARTIST              Song artist\n  TITLE               Song title\n\noptional arguments:\n  -h, --help          show this help message and exit\n  --database FILE     Path to local lyrics database (default:\n                      $MUSICBATCH_LYRICSDB or ~/.lyrics.db)\n  --scan-library DIR  Populate local lyrics database with texts for all songs\n                      in this directory (recursive)\n  --retry-scheduled   Retry fetching lyrics that were unavailable in previous\n                      runs\n```\n\n### metadata\n\n```\nusage: music metadata [-h] [--recursive] [--location LOCATION]\n                      (--generate | --add-categories CATEGORIES\n                      | --set-categories CATEGORIES | --del-categories CATEGORIES\n                      | --clear-categories) DIR\n\nManage music metadata with YAML files\n\npositional arguments:\n  DIR                   Directory with music files\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --recursive           Process all nested directories within DIR\n  --location LOCATION   Relative path to metadata file\n                        (default=.meta\\info.yml)\n  --generate            Create metadata file(s) for specified directory\n  --add-categories CATEGORIES\n                        Add specified category or categories (comma-separated\n                        list) to metadata file\n  --set-categories CATEGORIES\n                        Replace categories in metadata file with specified\n                        values\n  --del-categories CATEGORIES\n                        Remove specified categories from metadata file(s)\n  --clear-categories    Remove all categories from metadata file(s)\n```\n\n\n### transcoder\n\n```\nusage: music transcoder [-h] [--newconfig] CONFIG\n\nBatch transcode music files according to the provided configuration file\n\npositional arguments:\n  CONFIG       Path to YAML description of the transcoding job\n\noptional arguments:\n  -h, --help   show this help message and exit\n  --newconfig  Create new configuration file from template and open it for\n               editing\n\nThis program relies on FFmpeg \u003chttp://ffmpeg.org\u003e for audio encoding.\nPlease make sure it's installed\n```\n\nTranscoding job is described with a YAML file. See sample below and refer to\n[JSON schema](musicbatch/transcoder/schema.json) for more information.\n\n```yaml\nname: Sansa Clip Zip  # required: transcoding job identifier\n\ninput:  # required: at least one directory path\n  - /home/user/music\n  - /media/torrents/music\n\noutput:\n  directory: /media/user/SANSA_SD  # required: path to destination directory\n  pattern: '{artist}/{year} - {album}/{number} - {title}'  # optional: file hierarchy in destination directory\n  format: vorbis  # optional: vorbis(default)/opus/lame/aac/copy/symlink\n  quality: q5  # optional: default value depends on selected output format\n  lossy_source: copy  # optional: copy (default) / allow_bad_transcodes / skip\n  category_blacklist:  # optional: select which albums to transcode based on HODS metadata files\n  # also: category_whitelist\n    - foo\n    - bar\n\nextras:\n  lyrics: /path/to/lyrics/database-or-directory  # optional: path to lyrics database / lyrics directory / null or false to skip copying lyrics\n  cover: 96  # optional: max size of cover art in pixels / null, false to disable copying covers\n```\n\n\n\n## Support and contributing\n\nIf you need help using these tools from command line or including them into\nyour Python project, please create\n**[an issue](https://github.com/sio/musicbatch/issues)**. Issues are also the\nprimary venue for reporting bugs and posting feature requests. General\ndiscussion related to this project is also acceptable and very welcome!\n\nIn case you wish to contribute code or documentation, feel free to open **[a\npull request](https://github.com/sio/musicbatch/pulls)**. That would certainly\nmake my day!\n\nI'm open to dialog and I promise to behave responsibly and treat all\ncontributors with respect. Please try to do the same, and treat others the way\nyou want to be treated.\n\nIf for some reason you'd rather not use the issue tracker, contacting me via\nemail is OK too. Please use a descriptive subject line to enhance visibility\nof your message. Also please keep in mind that public discussion channels are\npreferable because that way many other people may benefit from reading past\nconversations. My email is visible under the GitHub profile and in the commit\nlog.\n\n\n\n## License and copyright\n\nCopyright 2019 Vitaly Potyarkin\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n\n\n## Development roadmap\n\n- Manage album metadata\n    - Generate info page\n- Extras\n    - Add support for aoTuV path\n- JSON Schema\n    - Add default values to json schema\n    - Generate documentation from json schema\n- `git grep TОDО`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsio%2Fmusicbatch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsio%2Fmusicbatch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsio%2Fmusicbatch/lists"}