{"id":13552743,"url":"https://github.com/blizzy78/textsimilarity","last_synced_at":"2026-01-21T15:07:48.628Z","repository":{"id":143626190,"uuid":"423155383","full_name":"blizzy78/textsimilarity","owner":"blizzy78","description":"Analyze files for copied and pasted (and possibly slightly modified) text","archived":false,"fork":false,"pushed_at":"2025-08-16T17:10:38.000Z","size":539,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-16T19:06:27.522Z","etag":null,"topics":["copy-paste"],"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/blizzy78.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-31T13:27:16.000Z","updated_at":"2025-08-16T17:11:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"3851b0c2-ff9d-469f-972b-131531645e81","html_url":"https://github.com/blizzy78/textsimilarity","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/blizzy78/textsimilarity","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blizzy78%2Ftextsimilarity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blizzy78%2Ftextsimilarity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blizzy78%2Ftextsimilarity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blizzy78%2Ftextsimilarity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blizzy78","download_url":"https://codeload.github.com/blizzy78/textsimilarity/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blizzy78%2Ftextsimilarity/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28635123,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T14:50:40.221Z","status":"ssl_error","status_checked_at":"2026-01-21T14:48:59.225Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["copy-paste"],"created_at":"2024-08-01T12:02:09.134Z","updated_at":"2026-01-21T15:07:48.623Z","avatar_url":"https://github.com/blizzy78.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"[![GoDoc](https://pkg.go.dev/badge/github.com/blizzy78/textsimilarity)](https://pkg.go.dev/github.com/blizzy78/textsimilarity)\n\n\ntextsimilarity\n==============\n\nA Go package to analyze files for copied and pasted (and possibly slightly modified) text.\n\nThis can be used to not only find exactly equal occurrences, but also occurrences that have slight modifications,\nsuch as names of variables changed in source code.\n\n\nCommand Line Usage\n------------------\n\nThe `cmd/textsimilarity/` folder provides a standalone command line utility. You can build it like this:\n\n```\ngo build -o textsimilarity ./cmd/textsimilarity/\n```\n\nTo install globally, run the following:\n\n```\ngo install github.com/blizzy78/textsimilarity/cmd/textsimilarity@latest\n```\n\nYou can also run it directly\n\n```\ngo run github.com/blizzy78/textsimilarity/cmd/textsimilarity@latest ...\n```\n\n\nUsage Example\n-------------\n\nAfter installation, you can now run it against [restic] source code, with [icdiff] as the diff tool:\n\n~~~bash\n$ git clone https://github.com/restic/restic.git\n$ cd restic\n\n$ textsimilarity \\\n\t-progress \\\n\t-ignoreWS -ignoreBlank -minLen 6 -minLines 10 -maxDist 3 \\\n\t-ignoreRE '^[ \\t]*(\\*|//)' \\\n\t-alwaysDiffRE '^(package|import)' \\\n\t-diffTool 'icdiff --cols=150 --tabsize=4 --no-headers -W {{.File1}} {{.File2}}' \\\n\t-ignoreDiffToolRC \\\n\t-printEqual \\\n\t$(find . -type f -name '*\\.go' -not \\( -name '*_test.go' -o -name build.go -o -path '*helpers/*' \\))\n~~~\n\nThis will result in the following output:\n\n[![Sample Output](similarities-thumb.png)](similarities.png)\n\n_(Click to enlarge. This is only part of the output.)_\n\n\nLicense\n-------\n\nThis package is licensed under the MIT license.\n\n\n\n[restic]: https://github.com/restic/restic\n[icdiff]: https://github.com/jeffkaufman/icdiff\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblizzy78%2Ftextsimilarity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblizzy78%2Ftextsimilarity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblizzy78%2Ftextsimilarity/lists"}