{"id":30184631,"url":"https://github.com/studyresearchprojects/file-copycat","last_synced_at":"2025-08-12T12:43:53.331Z","repository":{"id":104133020,"uuid":"414766375","full_name":"StudyResearchProjects/file-copycat","owner":"StudyResearchProjects","description":"A library that writes a copy of a watched file on write with optionally replacing bytes on write.","archived":false,"fork":false,"pushed_at":"2021-10-07T21:50:27.000Z","size":1,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-06T00:42:55.704Z","etag":null,"topics":["copycat","cow","fs","rust","watcher"],"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/StudyResearchProjects.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-07T21:45:24.000Z","updated_at":"2025-08-04T20:57:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"8b5698c4-8430-4cfc-9da0-c7e65a0fd1ec","html_url":"https://github.com/StudyResearchProjects/file-copycat","commit_stats":null,"previous_names":["leoborai/file-copycat","estebanborai/file-copycat","studyresearchprojects/file-copycat"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/StudyResearchProjects/file-copycat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StudyResearchProjects%2Ffile-copycat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StudyResearchProjects%2Ffile-copycat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StudyResearchProjects%2Ffile-copycat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StudyResearchProjects%2Ffile-copycat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StudyResearchProjects","download_url":"https://codeload.github.com/StudyResearchProjects/file-copycat/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StudyResearchProjects%2Ffile-copycat/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270064257,"owners_count":24520928,"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","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["copycat","cow","fs","rust","watcher"],"created_at":"2025-08-12T12:43:47.359Z","updated_at":"2025-08-12T12:43:53.287Z","avatar_url":"https://github.com/StudyResearchProjects.png","language":"Rust","readme":"This crate is a WIP.\n\n## Usage\n\nCreate a new binary crate and reference this crate wherever it is:\n\n```toml\n[package]\nname = \"test-file-copycat\"\nversion = \"0.1.0\"\nedition = \"2018\"\n\n# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html\n\n[dependencies]\nfile-copycat = { path = \"relative/path/to/the/crate\" }\n```\n\nCreate two files, one is the input file you want to watch changes for\n(`./testfile.txt`). The other is the output file you want to write on\n(`./outputfile.txt`).\n\nThen paste the following code into the `main.rs` file\n\n```rust\nuse file_copycat::watch;\nuse std::str::from_utf8;\n\nfn main() {\n    let replacer = |input: Vec\u003cu8\u003e| {\n        let mut utf8 = from_utf8(\u0026input).unwrap();\n        let replaced = utf8.replace(\"hello\", \"goodbye\");\n\n        replaced.as_bytes().to_vec()\n    };\n\n    if let Err(err) = watch(\"./testfile.txt\", \"./outputfile.txt\", Box::new(replacer)) {\n        println!(\"{:?}\", err);\n    }\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstudyresearchprojects%2Ffile-copycat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstudyresearchprojects%2Ffile-copycat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstudyresearchprojects%2Ffile-copycat/lists"}