{"id":13503017,"url":"https://github.com/yaa110/nomino","last_synced_at":"2025-05-14T13:02:39.849Z","repository":{"id":44370123,"uuid":"256390681","full_name":"yaa110/nomino","owner":"yaa110","description":"Batch rename utility for developers","archived":false,"fork":false,"pushed_at":"2025-02-20T18:20:06.000Z","size":1145,"stargazers_count":669,"open_issues_count":6,"forks_count":23,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-05-12T03:19:18.692Z","etag":null,"topics":["batch-rename","command-line-tool","files","regex","rename","rust","rustlang","subdirectories","utility"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/yaa110.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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":"2020-04-17T03:23:39.000Z","updated_at":"2025-05-10T08:10:16.000Z","dependencies_parsed_at":"2024-06-06T14:46:27.825Z","dependency_job_id":"3c9b494c-61fc-4bdf-8b37-d4ba62e1820a","html_url":"https://github.com/yaa110/nomino","commit_stats":{"total_commits":78,"total_committers":3,"mean_commits":26.0,"dds":0.02564102564102566,"last_synced_commit":"8e6bc5acb409c1d648574b0d2deae4ec851192ca"},"previous_names":[],"tags_count":44,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaa110%2Fnomino","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaa110%2Fnomino/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaa110%2Fnomino/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaa110%2Fnomino/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yaa110","download_url":"https://codeload.github.com/yaa110/nomino/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254149649,"owners_count":22022846,"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":["batch-rename","command-line-tool","files","regex","rename","rust","rustlang","subdirectories","utility"],"created_at":"2024-07-31T22:02:33.557Z","updated_at":"2025-05-14T13:02:39.769Z","avatar_url":"https://github.com/yaa110.png","language":"Rust","readme":"# nomino\n\n[![Test](https://github.com/yaa110/nomino/workflows/Test/badge.svg)](https://github.com/yaa110/nomino/actions) [![Download](https://img.shields.io/badge/download-releases-blue.svg)](https://github.com/yaa110/nomino/releases/latest) [![Wiki](https://img.shields.io/badge/wiki-docs-orange.svg)](https://github.com/yaa110/nomino/wiki)\n\nBatch rename utility for developers\n\n![Alt text](/screenshots/regex.png?raw=true \"Example Screenshot\")\n\n## How to install\n\n### Pre-Compiled\n\nYou can download a pre-compiled executable for Linux, MacOS and Windows operating systems, then you should copy that executable to a location from your `$PATH` env:\n\n- [Linux 64bit](https://github.com/yaa110/nomino/releases/latest/download/nomino-linux-64bit)\n- [MacOS 64bit](https://github.com/yaa110/nomino/releases/latest/download/nomino-macos-64bit)\n- [Windows 64bit](https://github.com/yaa110/nomino/releases/latest/download/nomino-windows-64bit.exe)\n\nYou might need to run `chmod +x nomino-linux-64bit` or `chmod +x nomino-macos-64bit`.\n\n### Build Manually\n\nIf you prefer to build nomino manually, or a pre-compiled executable is not provided for your target, then you can build nomino from scratch:\n\n- Install Rust: `curl -sSf https://sh.rustup.rs | sh`\n- Run `cargo install nomino`\n\n## Usage\n\n```bash\nUsage:\n    nomino [OPTIONS] [[SOURCE] OUTPUT]...\n\nArguments:\n  [[SOURCE] OUTPUT]...\n          OUTPUT is the pattern to be used for renaming files, and SOURCE is the optional regex pattern to match by filenames. SOURCE has the same function as -r option\n\nOptions:\n  -d, --dir \u003cPATH\u003e          Sets the working directory\n      --depth \u003cDEPTH\u003e       Optional value to overwrite inferred subdirectory depth value in 'regex' mode\n  -E, --no-extension        Does not preserve the extension of input files in 'sort' and 'regex' options\n  -g, --generate \u003cPATH\u003e     Stores a JSON map file in '\u003cPATH\u003e' after renaming files\n  -h, --help                Print help (see a summary with '-h')\n  -k, --mkdir               Recursively creates all parent directories of '\u003cOUTPUT\u003e' if they are missing\n  -m, --map \u003cPATH\u003e          Sets the path of map file to be used for renaming files\n      --from-file \u003cPATH\u003e    Alias for --map\n      --max-depth \u003cDEPTH\u003e   Optional value to set the maximum of subdirectory depth value in 'regex' mode\n  -q, --quiet               Does not print the map table to stdout\n  -r, --regex \u003cPATTERN\u003e     Regex pattern to match by filenames\n  -s, --sort \u003cORDER\u003e        Sets the order of natural sorting (by name) to rename files using enumerator\n                                Possible ORDER values:\n                                - asc:  Sort in ascending order\n                                - desc: Sort in descending order\n  -t, --test                Runs in test mode without renaming actual files\n      --dry-run             Alias for --test\n  -V, --version             Print version\n  -w, --overwrite           Overwrites output files, otherwise, a '_' is prepended to filename\n\nOUTPUT pattern accepts placeholders that have the format of '{G:P}' where 'G' is the captured group and 'P' is the padding of digits with `0`. Please refer to https://github.com/yaa110/nomino for more information.\n```\n\n### Placeholders\n\n1. Placeholders have the format of `{G:P}` where `G` is the captured group and `P` is the padding of digits with `0`. For example, `{2:3}` means the third captured group with a padding of 3, i.e. `1` is formatted as `001`.\n1. Indices start from `0`, and `{0}` means the filename.\n1. The capture group `G` could be dropped, i.e. `{}` or `{:3}`. In this case an auto incremental index is used which starts from `1`. For example, `{} {}` equals `{1} {2}`.\n1. `{` and `}` characters could be escaped using `\\` character, i.e. `\\\\{` and `\\\\}` in cli.\n1. Padding is only used for positive numbers, e.g. the formatted result of `{:3}` for `1` is `001`, for `-1` is `-1` and for `a` is `a`.\n1. If `--sort` option is used, the first index `{0}` is the filename and the second index `{1}` or first occurrence of `{}` is the enumerator index.\n\n### Capture Groups\n\nThe accepted syntax of regex pattern is [Rust Regex](https://docs.rs/regex/latest/regex/).\n\nConsider this example:\n\n```regex\n(?\u003cfirst\u003e\\w)(\\w)\\w(?\u003clast\u003e\\w)\n```\n\nThis regular expression defines 4 capture groups:\n\n- The group at index `0` corresponds to the overall match. It is always present in every match and never has a name: `{0}`.\n- The group at index `1` with name `first` corresponding to the first letter: `{1}`, `{first}` or the first occurrence of `{}`.\n- The group at index `2` with no name corresponding to the second letter: `{2}` or the second occurrence of `{}`.\n- The group at index `3` with name `last` corresponding to the fourth and last letter: `{3}`, `{last}` or the third occurrence of `{}`.\n\n`?\u003cfirst\u003e` and `?\u003clast\u003e` are named capture groups.\n\n### Windows\n\nOn Windows, `\\\\` must be used to separate path components in file paths because `\\` is a special character in regular expressions.\n\n## Map file format\n\n```json\n{\n    \"\u003cinput1\u003e\": \"\u003coutput1\u003e\",\n    \"\u003cinput2\u003e\": \"\u003coutput2\u003e\",\n    \"\u003c...\u003e\": \"\u003c...\u003e\"\n}\n```\n\n## Wiki\n\n- **[Examples](https://github.com/yaa110/nomino/wiki/Examples)** learn nomino by examples\n- **[Benchmark](https://github.com/yaa110/nomino/wiki/Benchmark)** benchmark test of similar utilities to nomino\n","funding_links":[],"categories":["Rust","Applications","应用程序 Applications","rust","Files and Directories","\u003ca name=\"file-renamer\"\u003e\u003c/a\u003eFile renamers","Grep-like tools","Other"],"sub_categories":["Utilities","公用事业公司 Utilities","Directory Navigation","Deleting, Copying, and Renaming","Command line"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyaa110%2Fnomino","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyaa110%2Fnomino","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyaa110%2Fnomino/lists"}