{"id":13626170,"url":"https://github.com/quebin31/muso","last_synced_at":"2026-01-16T19:55:35.413Z","repository":{"id":47376906,"uuid":"239668203","full_name":"quebin31/muso","owner":"quebin31","description":"muso: music sorter","archived":false,"fork":false,"pushed_at":"2021-09-02T02:36:41.000Z","size":5269,"stargazers_count":91,"open_issues_count":3,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-11-08T15:47:24.572Z","etag":null,"topics":["album","artist","media","music","muso","organizer","sorter","watcher"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/quebin31.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-11T03:33:14.000Z","updated_at":"2024-11-04T00:01:05.000Z","dependencies_parsed_at":"2022-08-22T11:20:19.183Z","dependency_job_id":null,"html_url":"https://github.com/quebin31/muso","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quebin31%2Fmuso","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quebin31%2Fmuso/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quebin31%2Fmuso/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quebin31%2Fmuso/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/quebin31","download_url":"https://codeload.github.com/quebin31/muso/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249235063,"owners_count":21235140,"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":["album","artist","media","music","muso","organizer","sorter","watcher"],"created_at":"2024-08-01T21:02:11.772Z","updated_at":"2026-01-16T19:55:35.404Z","avatar_url":"https://github.com/quebin31.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"\u003c!--\n Copyright (C) 2020 kevin\n \n This file is part of muso.\n \n muso is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n \n muso is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n GNU General Public License for more details.\n \n You should have received a copy of the GNU General Public License\n along with muso.  If not, see \u003chttp://www.gnu.org/licenses/\u003e.\n--\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003c!--  New lines go brrrr --\u003e\n    \u003cbr\u003e\n    \u003cbr\u003e\n    \u003cimage src=\"logo/muso.png\" alt=\"muso\"\u003e\u003c/image\u003e\n    \u003cbr\u003e\n    \u003cbr\u003e\n    \u003cimage src=\"https://github.com/quebin31/muso/workflows/CI%20(master)/badge.svg\" alt=\"Continuous integration\"\u003e\u003c/image\u003e\n\u003c/p\u003e\n\n## About\n\n**muso** is a CLI tool that helps you to keep your music folder sorted. It's\ndesigned to be simple and fast, but also powerful and fully automated. Currently \n**muso** supports MP3, FLAC, OGG, M4A and M4P.\n\n## Building\nTo build **muso** yourself you need at least Rust 1.41. If you aren't going \nto install it using a package manager you should build **muso** with feature \n`standalone` activated, for example:\n\n```bash\ncargo build --features standalone --release\n```\n\nThe standalone feature include contents of [service](share/muso.service) and \n[config](share/config.toml) in binary, so **muso** can create these files by itself.\n\n## Installing\nTo install from source using cargo (installed bin is in `$HOME/.cargo/bin`)\nyou can do the following:\n\n```bash\ncargo install --path . --features standalone\n```\n\nPackage is also [available on the AUR](https://aur.archlinux.org/packages/muso) \nfor Arch Linux, just install it using your preferred method, for example:\n\n```bash\nyay -S muso\n```\n\n## Concepts\n\n### Format string\n**muso** is all about renaming and moving files around, but how it'll decide\nwhere the new file will reside, or which is going to be its name? Fortunately\nyou can tell **muso** how to rename your files with a *format string*. This\nstring will build the new name (path) using one or more of the following\nplaceholders:\n\n- `{artist}`: Artist name (**Album Artist** from tags is preferred, then **Artist**).\n- `{album}`: Album name.\n- `{disc}`: Disc number.\n- `{track}`: Track number.\n- `{title}`: Song title.\n- `{ext}`: File extension (e.g. `mp3`, `flac`)\n\nAs an example, the default format that **muso** will use is the following.\n\n```rs\n\"{artist}/{album}/{track} - {title}.{ext}\"\n```\n\nThe `{disc}` and `{track}` placeholders have the option to fill\nwith leading zeros, the syntax is `{disc:n}` or `{track:n}` where `n` is the\nlength that has to be achieved adding leading zeros. For example, using `{disc:2}` will produce the following transformations:\n\n- `2` will become `02`\n- `10` will become `10`\n\nFinally, all of these placeholders (except `{ext}`) support an optional flag \n(activated by adding a `?` before the `}`, e.g. `{artist?}`, `{disc:2?}`). \nRenaming a file that doesn't have an specific tag doesn't fail but leaves empty \nthat placeholder in the string, however note that there are some rules:\n\n- Directory components cannot be optional (e.g. this is invalid `{artist}/{album?}/{title}.{ext}`)\n- File name component must have one required placeholder, apart from `{ext}` (e.g. this is invalid `{artist}/{title?}.{ext}`)\n\n**Note:** These rules may be different in the future if I find a better way to fill these \"unknowns\" (possibly using `?` for digits and `Unknown` for strings, or adding the option to provide a custom value).\n\nA format string can be specified for *oneshot* mode using the `-f/--format`\noption, or providing it in for each [library](#libraries) in the [config\nfile](share/config.toml).\n\n### Libraries\nWe recently talked about libraries, these objects are used in the [config\nfile](share/config.toml) to provide **muso** settings while it's running in\n*watcher* mode. For example, the default library provided in the [default config file](share/config.toml) is described as follows.\n\n```toml\n[libraries.default]\n# Specified format that will be used for this library\nformat = '{artist}/{album}/{track} - {title}.{ext}'\n# Folders that compose this library\nfolders = ['$HOME/Music']\n# If enabled, the rename will be compatible with exFAT\nexfat-compat = true\n\n```\n\nThey are used to provide different options, to different folders. \n\n### Config file\n**muso** will search for a config file in the following directories in order:\n- `$XDG_CONFIG_DIR/muso/config.toml`\n- `$HOME/.config/muso/config.toml`\n\nIt's also possible to indicate a custom path for config file with the\n`-c/--config` option. Config file is primary used when running in *watcher*\nmode, but it's also able to provide a default *format string* for certain\nfolders while running in *oneshot* mode. For example, in the [default config\nfile](share/config.toml) the default library specifies a format and a list of\nfolders, if you would run **muso** on `$HOME/Music` without specifying a\nformat, it'll try to grab it from the config file, if there isn't one that\ncorrespond to the folder it'll fallback to the [default](#format-string).\n\n## Usage\n**muso** can be used in two modes: *oneshot* and *watcher*. Both of them have \nsimilar functionalities, but as the naming suggest they perform it differently.\nBelow we have the output of `muso --help`, which explains each option or flag available\n\n```\nUSAGE:\n    muso [OPTIONS] \u003cSUBCOMMAND\u003e\n\nFLAGS:\n    -h, --help       Prints help information\n    -V, --version    Prints version information\n\nOPTIONS:\n    -c, --config \u003cconfig\u003e    Path to custom config file\n\nSUBCOMMANDS:\n    copy-service    Copy service file to systemd user config dir\n    help            Prints this message or the help of the given subcommand(s)\n    sort            Sort a music directory\n    watch           Watch libraries and sort added files\n```\n\n### Oneshot\nBy the default, **muso** will run on the current working dir, but you can\nprovide your own path as a free argument. Config file is optional in this mode.\n\n### Watcher\nIn this mode config file is required, and as it's described in section `[watch]` \nof the [default config file](share/config.toml), the watcher can be configured.\n\n```toml\n[watch]\nevery = 1 # second(s)\n# Specifies which libraries will be seen by muso\nlibraries = [ 'default' ]\n```\n\n### Systemd service\nIt's recommended to invoke the *watcher* mode using the provided [service\nfile](share/muso.service) for `systemd`, this way you can run **muso**\nautomatically on boot. Service file should be run on user level (`systemctl\n--user`). The easiest way to copy the service file is running **muso** with\n`copy-service` subcommand.\n\n## License\n\nGNU General Public License v3.0 \n\nSee [LICENSE](LICENSE) to see the full text.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquebin31%2Fmuso","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquebin31%2Fmuso","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquebin31%2Fmuso/lists"}