{"id":16170419,"url":"https://github.com/corentinth/bame","last_synced_at":"2025-03-18T23:31:10.094Z","repository":{"id":36474495,"uuid":"225701984","full_name":"CorentinTh/bame","owner":"CorentinTh","description":"A cross-plateform tool to rename files batches using regex.","archived":false,"fork":false,"pushed_at":"2023-01-05T02:47:57.000Z","size":1727,"stargazers_count":19,"open_issues_count":11,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-17T01:03:32.765Z","etag":null,"topics":["bulk","cross-platform","javascript","npm","rename"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CorentinTh.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}},"created_at":"2019-12-03T19:45:52.000Z","updated_at":"2025-03-09T06:22:58.000Z","dependencies_parsed_at":"2023-01-17T01:50:10.250Z","dependency_job_id":null,"html_url":"https://github.com/CorentinTh/bame","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CorentinTh%2Fbame","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CorentinTh%2Fbame/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CorentinTh%2Fbame/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CorentinTh%2Fbame/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CorentinTh","download_url":"https://codeload.github.com/CorentinTh/bame/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244325311,"owners_count":20435082,"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":["bulk","cross-platform","javascript","npm","rename"],"created_at":"2024-10-10T03:18:42.345Z","updated_at":"2025-03-18T23:31:09.759Z","avatar_url":"https://github.com/CorentinTh.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\".github/bame-banner.png\" alt=\"bame banner\"\u003e\n\u003c/p\u003e\n\n-------\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/CorentinTh/bame/actions\"\u003e\n        \u003cimg src=\"https://github.com/CorentinTh/bame/workflows/Node%20CI/badge.svg\" alt=\"actions badge\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://codecov.io/gh/CorentinTh/bame\"\u003e\n        \u003cimg src=\"https://codecov.io/gh/CorentinTh/bame/branch/dev/graph/badge.svg?token=R7tb8smlR9\" alt=\"coverage badge\"/\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n\n\n![demo gif](.github/bame-demo.gif)\n\n## Bame ?\n\nThe word **bame** come frome the portmenteau between *batch* and *rename*. **Bame** is a simple cross-plateform cli that'll help you rename several files at once.  \n\n## Usage\n### Installation\n**bame** can be installed using yarn or npm. It works for node version \u003e= 8.\n\n```shell\nnpm install -g bame\n# or\nyarn global add bame\n```\n\n### CLI\n\nSimply run `bame` in the directory where the files you want to rename are located. Specify a regular expression with capturing groups (with parentesis) for the parts you want to keep while renaming. Then specify a string with the index of the capturing group you want to insert between braquets. \n\nFor example:\n\n```shell\nbame 'SerieName Episode (.*) Season (.*).mp4' 'SerieName - S{1}E{2}.mp4'\n# SerieName Episode 1 Season 1.mp4     --\u003e     SerieName - S1E1.mp4\n# SerieName Episode 2 Season 1.mp4     --\u003e     SerieName - S1E2.mp4\n# SerieName Episode 3 Season 1.mp4     --\u003e     SerieName - S1E3.mp4\n# SerieName Episode 4 Season 1.mp4     --\u003e     SerieName - S1E4.mp4\n```\n\nDetails and optional parameters:\n\n```shell\nUsage: bame \u003cinReg\u003e \u003coutReg\u003e\n\nOptions:\n  -d, --no-dir   Should not rename directories                         [boolean]\n  -q, --quiet    Rename silently                                       [boolean]\n  -h, --help     Show help                                             [boolean]\n  -v, --version  Show version number                                   [boolean]\n\nExamples:\n  bame \"GoT Episode (.*) Season (.*)\" \"GOT.E{1}.S{2}\"\n```\n\n### API\nYou can also integarte **bame** in som code:\n\n```javascript\nimport { bame } from 'bame';\n\nbame({\n    inReg: 'GoT Episode (.*) Season (.*)',\n    outReg: 'GOT.E{1}.S{2}',\n    cwd: process.cwd(),\n    options:{\n        renameDir: true,\n        verbose: true\n    }\n});\n```\n\n## Contribute\n**Pull requests are welcome !** Feel free to contribute.\n\n## Credits\nCoded with ❤️ by [Corentin Thomasset](//corentin-thomasset.fr).\n\nThe demonstartion gif has been generated using [Terminalizer](https://github.com/faressoft/terminalizer)\n\n## License\nThis project is under the [MIT license](./LICENSE).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorentinth%2Fbame","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcorentinth%2Fbame","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorentinth%2Fbame/lists"}