{"id":28913890,"url":"https://github.com/fabiomux/filter_rename","last_synced_at":"2025-12-31T14:36:45.355Z","repository":{"id":40682966,"uuid":"127395532","full_name":"fabiomux/filter_rename","owner":"fabiomux","description":"Bulk file renaming from CLI applying a chain of filters","archived":false,"fork":false,"pushed_at":"2023-12-26T09:21:37.000Z","size":144,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-05T22:42:14.801Z","etag":null,"topics":["file-rename","file-renamer","file-renaming","mp3-tags","ruby","ruby-gem"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/fabiomux.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"github":["fabiomux"],"ko_fi":"freeaptitude","custom":["https://paypal.me/fabiomux","https://www.buymeacoffee.com/DCkNYFg"]}},"created_at":"2018-03-30T07:18:46.000Z","updated_at":"2022-05-20T13:55:32.000Z","dependencies_parsed_at":"2023-12-26T10:29:15.264Z","dependency_job_id":"f75259da-710c-4902-a350-576ff78d1ed3","html_url":"https://github.com/fabiomux/filter_rename","commit_stats":{"total_commits":45,"total_committers":1,"mean_commits":45.0,"dds":0.0,"last_synced_commit":"4c6af449614829d20fdf1dcdf39efa2049574d3a"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/fabiomux/filter_rename","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiomux%2Ffilter_rename","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiomux%2Ffilter_rename/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiomux%2Ffilter_rename/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiomux%2Ffilter_rename/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fabiomux","download_url":"https://codeload.github.com/fabiomux/filter_rename/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiomux%2Ffilter_rename/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265820261,"owners_count":23833563,"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":["file-rename","file-renamer","file-renaming","mp3-tags","ruby","ruby-gem"],"created_at":"2025-06-21T21:11:04.237Z","updated_at":"2025-12-31T14:36:45.349Z","avatar_url":"https://github.com/fabiomux.png","language":"Ruby","funding_links":["https://github.com/sponsors/fabiomux","https://ko-fi.com/freeaptitude","https://paypal.me/fabiomux","https://www.buymeacoffee.com/DCkNYFg"],"categories":[],"sub_categories":[],"readme":"# FilterRename\n\nFilterRename is a CLI tool created for bulk file renaming that work appending a set of micro\noperations here called *filters*, which aim to replace most, if not all, the shell commands\nusually involved in that kind of operations (*sed*, *awk*, *trim*, ...) in a more safe and\ncomfortable manner.\n\n[![Ruby](https://github.com/fabiomux/filter_rename/actions/workflows/main.yml/badge.svg)][wf_main]\n[![Gem Version](https://badge.fury.io/rb/filter_rename.svg)][gem_version]\n\n## Installation\n\n### Requirements\n\nThese two libraries must be installed:\n- **exiv2**\n- **taglib**\n\nWith *openSUSE*:\n```shell\n$ sudo zypper install libexiv2-devel libtag-devel\n```\n\nWith *Debian*/*Ubuntu*:\n```shell\n$ sudo apt-get install libexiv2-dev libtag1-dev\n```\n\n### Rubygem\n\nInstall it as a regular Ruby gem with:\n```shell\n$ gem install filter_rename\n```\n\n## Usage\n\nTo simplify the whole process through a command line, the full filename is logically organized\nin *targets*:\n\n    \u003cpath\u003e/\u003cfolder\u003e/\u003cname\u003e\u003cext\u003e\n\nFor example, considering the file `/home/fabio/Documents/Ruby/filter_rename/Gemfile.lock` we have:\n\n- path: */home/fabio/Documents/Ruby*\n- folder: *filter_rename*\n- name: *Gemfile*\n- ext: *.lock*\n\nThe chain of *filters* will be applied to the current *target*, which is *name* by default, but can\nbe changed using the *--select* option on the same command line without running the command twice.\n\nFor example, to capitalize the *ext* and upper case the *name* at the same time we can use:\n```shell\nfilter_rename Gemfile.lock --uppercase --select ext --capitalize\n```\n\nSo the file *Gemfile.lock* becomes *GEMFILE.Lock*.\n\nTo make things easier we can use a special class of *filters* that target a string as a list of *words*\nor *numbers* with their position used as index.\n\nFor example, having the files:\n\n    home\n      fabio\n        Documents\n          Photos\n            Vacations\n              image_from_portofino_0.jpg\n              image_from_portofino_1.jpg\n              image_from_portofino_2.jpg\n              ...\n\nWe want:\n- space-separated words in place of the underscore;\n- the first and third word capitalized;\n- the final number must start from 1;\n- the final number must be 2 digits wide.\n\nUsing:\n```shell\n$ filter_rename /home/fabio/Documents/Photos/Vacations/*.jpg \\\n                --spacify '_' \\\n                --capitalize-word 1:3 \\\n                --add-number 1,1 \\\n                --format-number 1,2\n```\n\nThe result is:\n\n    home\n      fabio\n        Documents\n          Photos\n            Vacations\n              Image from Portofino 01.jpg\n              Image from Portofino 02.jpg\n              Image from Portofino 03.jpg\n              ...\n\nIf you are wondering why all the commands above didn't affected the files physically on the disk,\nthen must be aware of the three main operations contemplated:\n- *diff*: shows the results verbosly without making any change (default);\n- *dry-run*: executes a simulation warning also for renaming conflicts;\n- *apply*: confirm the changes and rename the files unless the destination file exists.\n\nLast but not least filter_rename also supports *macros* and *regular expressions*, and the ability to\nsetup configurations params on the fly (*config* and *global*).\n\n## Get help\n\nWhere to start\n```shell\n$ filter_rename --help\n```\n\n## More help\n\nMore info is available at:\n- the [FilterRename GitHub wiki][filter_rename_wiki].\n\n\n[filter_rename_wiki]: https://github.com/fabiomux/filter_rename/wiki \"FilterRename wiki page on GitHub\"\n[wf_main]: https://github.com/fabiomux/filter_rename/actions/workflows/main.yml\n[gem_version]: https://badge.fury.io/rb/filter_rename\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabiomux%2Ffilter_rename","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffabiomux%2Ffilter_rename","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabiomux%2Ffilter_rename/lists"}