{"id":15211177,"url":"https://github.com/alligatorjazz/cpar","last_synced_at":"2026-01-28T07:04:55.512Z","repository":{"id":63264940,"uuid":"566573846","full_name":"alligatorjazz/cpar","owner":"alligatorjazz","description":"A commmand line utility that allows for batch copying \u0026 renaming with pseudo-globs.","archived":false,"fork":false,"pushed_at":"2022-12-03T16:48:21.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-28T01:50:27.637Z","etag":null,"topics":["bash","cli","filesystem","rust","zsh"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alligatorjazz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-11-16T00:38:27.000Z","updated_at":"2024-03-15T18:20:40.000Z","dependencies_parsed_at":"2023-01-22T16:55:12.023Z","dependency_job_id":null,"html_url":"https://github.com/alligatorjazz/cpar","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alligatorjazz%2Fcpar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alligatorjazz%2Fcpar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alligatorjazz%2Fcpar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alligatorjazz%2Fcpar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alligatorjazz","download_url":"https://codeload.github.com/alligatorjazz/cpar/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242940018,"owners_count":20209883,"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":["bash","cli","filesystem","rust","zsh"],"created_at":"2024-09-28T08:20:29.793Z","updated_at":"2026-01-28T07:04:55.422Z","avatar_url":"https://github.com/alligatorjazz.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cpar\n**A commmand line utility that allows for batch coping \u0026 renaming with globs.**\n\n## Help Page\n```\nCopies and mass-renames files using the variable character ($)\n\nUsage: cpar \u003cINPUT_PATH\u003e \u003cOUTPUT_PATH\u003e\n\nArguments:\n  \u003cINPUT_PATH\u003e   The files to be copied and renamed\n  \u003cOUTPUT_PATH\u003e  The path for the renamed files\n\nOptions:\n  -h, --help     Print help information\n  -V, --version  Print version information\n```\n\n## Example\n\n### Making new copies with different names\nAssume a folder with the following files:\n```\nsrc/\n\t- ContactForm.tsx\n\t- ContactForm.module.scss\n\t- ContactForm.astro\n```\n\n`cpar src/ContactForm$ src/MembershipForm$` the folder will contain:\n\n```\nsrc/\n\t- ContactForm.tsx\n\t- ContactForm.module.scss\n\t- ContactForm.astro\n\t+ MembershipForm.tsx (same contents as ContactForm.tsx)\n\t+ MembershipForm.module.scss (same contents as ContactForm.module.scss)\n\t+ MembershipForm.astro (same contents as ContactForm.astro)\n```\n\n### Making new copies with different extensions\nAssume a folder with the following files:\n```\nsrc/\n\t- foo.ts\n\t- bar.ts\n```\n\n`cpar src/$.js src/$.ts` the folder will contain:\n\n```\nsrc/\n\t- foo.js\n\t- bar.js\n```\n\n### Test Command\n`cargo test -- --test-threads=1`\n\n## Use Cases\nProbably a bunch, but the ones that prodded me to make the tool in the first place were:\n- Build scripts for multi-language projects\n- Porting large numbers of HTML templates to `.astro` files\n- Creating a copy of a web UI component to use as a starter template\n\n## Todos for V1 \n- Implement a proper Rust testing library - the included tests are rudimentary and use the standard library.\n- Change tests such that they can run in parallel (currently they only run consecutively)\n- Find a way to use the actual Bash wildcard character (`*`) in place of (`$`).\n- Publish to Homebrew + some APT-compatible repository","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falligatorjazz%2Fcpar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falligatorjazz%2Fcpar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falligatorjazz%2Fcpar/lists"}