{"id":17308747,"url":"https://github.com/guerinoni/replacer","last_synced_at":"2025-04-14T13:45:17.165Z","repository":{"id":37959404,"uuid":"277725934","full_name":"guerinoni/replacer","owner":"guerinoni","description":"Command-line tool to rename a lot of files with some rules :)","archived":false,"fork":false,"pushed_at":"2023-07-31T09:18:54.000Z","size":2555,"stargazers_count":8,"open_issues_count":2,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T02:53:06.289Z","etag":null,"topics":["cli","cli-app","command-line","command-line-tool","filename","filename-utils","filenames-change","filesystem","go","golang","hacktoberfest"],"latest_commit_sha":null,"homepage":"","language":"Go","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/guerinoni.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-07T05:33:09.000Z","updated_at":"2024-04-02T17:41:10.000Z","dependencies_parsed_at":"2024-06-19T01:53:52.679Z","dependency_job_id":"018ad947-3cd2-4166-bf2a-1cf4f36d85e4","html_url":"https://github.com/guerinoni/replacer","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guerinoni%2Freplacer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guerinoni%2Freplacer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guerinoni%2Freplacer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guerinoni%2Freplacer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guerinoni","download_url":"https://codeload.github.com/guerinoni/replacer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248890459,"owners_count":21178432,"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":["cli","cli-app","command-line","command-line-tool","filename","filename-utils","filenames-change","filesystem","go","golang","hacktoberfest"],"created_at":"2024-10-15T12:05:56.682Z","updated_at":"2025-04-14T13:45:17.139Z","avatar_url":"https://github.com/guerinoni.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# replacer \n![CI](https://github.com/guerinoni/replacer/workflows/CI/badge.svg)\n[![codecov](https://codecov.io/gh/guerinoni/replacer/branch/master/graph/badge.svg)](https://codecov.io/gh/guerinoni/replacer)\n[![lint](https://github.com/guerinoni/replacer/actions/workflows/lint.yml/badge.svg)](https://github.com/guerinoni/replacer/actions/workflows/lint.yml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/guerinoni/replacer)](https://goreportcard.com/report/github.com/guerinoni/replacer)\n\nCommand-line tool to rename a lot of files with some rules :)\n\n# Feature\n\n- [x] help  `replacer -h`\n- [x] change extension `replacer -d . -ext txt c` (-d = directory)\n- [x] change contains `replacer -d . -contains as ss`\n- [x] convert to snake_case `replacer -d . -snake`\n- [x] convert to camelCase `replacer -d . -camel`\n- [ ] rename list of files with incremental index\n\n\n## Benchmark\n\n```\ngo test -bench=. -benchmem\ngoos: linux\ngoarch: amd64\npkg: github.com/guerinoni/replacer\ncpu: Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz\nBenchmarkExecCamelCaseOneFile-8         \t   14736\t     71699 ns/op\t    2280 B/op\t      28 allocs/op\nBenchmarkExecCamelCaseDir-8             \t    1078\t   1268006 ns/op\t   22503 B/op\t     422 allocs/op\nBenchmarkExecCamelCaseLotDir-8          \t      55\t  20024731 ns/op\t  611971 B/op\t    4122 allocs/op\nBenchmarkExecCamelCaseManyDir-8         \t      15\t  74275259 ns/op\t 6993296 B/op\t   10864 allocs/op\nBenchmarkExecChangeContainsOneFile-8    \t   14798\t     82463 ns/op\t    2264 B/op\t      27 allocs/op\nBenchmarkExecChangeContainsDir-8        \t     956\t   1163330 ns/op\t   21177 B/op\t     412 allocs/op\nBenchmarkExecChangeContainsLotDir-8     \t      68\t  18553358 ns/op\t  568569 B/op\t    4024 allocs/op\nBenchmarkExecChangeContainsManyDir-8    \t      13\t  81944776 ns/op\t 6180158 B/op\t   10684 allocs/op\nBenchmarkExecChangeExtensionOneFile-8   \t   16408\t     69426 ns/op\t    2264 B/op\t      27 allocs/op\nBenchmarkExecChangeExtensionDir-8       \t    1114\t   1763960 ns/op\t   19175 B/op\t     412 allocs/op\nBenchmarkExecChangeExtensionLotDir-8    \t      74\t  13857763 ns/op\t  389218 B/op\t    4021 allocs/op\nBenchmarkExecChangeExtensionManyDir-8   \t       4\t 341479902 ns/op\t33262900 B/op\t   42103 allocs/op\nBenchmarkExecSnakeCaseOneFile-8         \t   15810\t     71889 ns/op\t    2280 B/op\t      28 allocs/op\nBenchmarkExecSnakeCaseDir-8             \t   88321\t     14756 ns/op\t    1931 B/op\t      27 allocs/op\nBenchmarkExecSnakeCaseLotDir-8          \t     109\t  10770991 ns/op\t  611515 B/op\t    4120 allocs/op\nBenchmarkExecSnakeCaseManyDir-8         \t      14\t  83155920 ns/op\t 5913929 B/op\t   10600 allocs/op\nPASS\nok  \tgithub.com/guerinoni/replacer\t24.268s\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguerinoni%2Freplacer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguerinoni%2Freplacer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguerinoni%2Freplacer/lists"}