{"id":19236516,"url":"https://github.com/krkarma777/string-difference-finder","last_synced_at":"2025-06-18T11:38:32.307Z","repository":{"id":240777066,"uuid":"803321918","full_name":"krkarma777/string-difference-finder","owner":"krkarma777","description":"A web tool to compare and highlight differences between two strings.","archived":false,"fork":false,"pushed_at":"2024-05-25T21:22:20.000Z","size":96,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-21T05:42:20.450Z","etag":null,"topics":["compare-strings","diff"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/krkarma777.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,"zenodo":null}},"created_at":"2024-05-20T13:56:56.000Z","updated_at":"2024-09-03T04:02:35.000Z","dependencies_parsed_at":"2024-11-09T16:35:43.864Z","dependency_job_id":null,"html_url":"https://github.com/krkarma777/string-difference-finder","commit_stats":null,"previous_names":["krkarma777/textdifftool_java","krkarma777/string-difference-finder"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/krkarma777/string-difference-finder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krkarma777%2Fstring-difference-finder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krkarma777%2Fstring-difference-finder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krkarma777%2Fstring-difference-finder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krkarma777%2Fstring-difference-finder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krkarma777","download_url":"https://codeload.github.com/krkarma777/string-difference-finder/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krkarma777%2Fstring-difference-finder/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260546084,"owners_count":23025870,"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":["compare-strings","diff"],"created_at":"2024-11-09T16:21:08.512Z","updated_at":"2025-06-18T11:38:27.275Z","avatar_url":"https://github.com/krkarma777.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# String Difference Finder\n![image](https://github.com/krkarma777/string-difference-finder/assets/149022496/8ca96001-bfac-4c1d-8168-108901ab3537)\n\n## Overview\n\nString Difference Finder is a web-based tool that allows you to compare two strings and visualize their differences. It highlights deletions in red and insertions in green, providing an intuitive way to understand changes between two versions of text. The tool leverages parallel processing to optimize the performance of the Longest Common Subsequence (LCS) algorithm, making it efficient for large inputs.\n\n## Features\n\n- **Token-based Diffing**: Splits strings into meaningful tokens for more accurate and readable diffs.\n- **Parallel Processing**: Utilizes parallel processing in LCS calculations to improve performance.\n- **Visual Highlighting**: Highlights deletions and insertions in red and green, respectively.\n- **Performance Metrics**: Displays the time taken to compute the differences.\n- **User-friendly Interface**: Simple and intuitive web interface for comparing strings.\n\n## Getting Started\n\n### Prerequisites\n\n- Java Development Kit (JDK) 17 or later\n- A web browser (Chrome, Firefox, Safari, etc.)\n- A web server to host the HTML and JavaScript files (optional for local usage)\n\n### Installation\n\n1. Clone the repository:\n   ```sh\n   git clone https://github.com/krkarma777/string-difference-finder.git\n   cd string-difference-finder\n   ```\n\n2. Build and run the Spring Boot application:\n   ```sh\n   ./gradlew bootRun\n   ```\n\n3. Open your web browser and navigate to:\n   ```\n   http://localhost:8090/\n   ```\n\n### Usage\n\n1. Enter the first string in the \"First String\" textarea.\n2. Enter the second string in the \"Second String\" textarea.\n3. Click the \"Show Difference\" button to see the highlighted differences.\n\n### Example\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n\u003chead\u003e\n    \u003cmeta charset=\"UTF-8\"\u003e\n    \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"\u003e\n    \u003ctitle\u003eString Difference Finder\u003c/title\u003e\n    \u003clink rel=\"stylesheet\" href=\"/stylesheet/diff.css\"/\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n\u003ch1\u003eString Difference Finder\u003c/h1\u003e\n\u003clabel for=\"string1\"\u003eFirst String:\u003c/label\u003e\n\u003ctextarea id=\"string1\" placeholder=\"Enter first string\"\u003e\ncommitter_list_per_month[date + '-' + log[i].author] = 1;\n\u003c/textarea\u003e\n\u003cbr\u003e\n\u003clabel for=\"string2\"\u003eSecond String:\u003c/label\u003e\n\u003ctextarea id=\"string2\" placeholder=\"Enter second string\"\u003e\nvar date_author = date + '-' + log[i].author;\n\u003c/textarea\u003e\n\u003cbr\u003e\n\u003cbutton onclick=\"findDifference()\"\u003eShow Difference\u003c/button\u003e\n\u003cdiv id=\"result\" class=\"difference\"\u003e\u003c/div\u003e\n\u003cscript src=\"/js/diff.js\"\u003e\u003c/script\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\n## Configuration\n\nThe application can be configured using the `application.properties` file:\n\n```properties\nspring.application.name=TextDiffTool\nserver.port=8090\n```\n\n## References\n\n- **Myer's Diff Algorithm**:\n  - [A technique for isolating differences between files](http://portal.acm.org/citation.cfm?doid=359460.359467)\n  - [An Algorithm for Differential File Comparison](https://www.cs.dartmouth.edu/~doug/diff.pdf)\n- **Diff-match-patch**:\n  - [Google's diff-match-patch library](https://github.com/google/diff-match-patch)\n- **Pre-diff speedups and post-diff cleanups**:\n  - [Neil Fraser's writing on diff](https://neil.fraser.name/writing/diff/)\n- **Hirschberg Algorithm**:\n  - [Algorithms for the Longest Common Subsequence Problem](https://dl.acm.org/doi/pdf/10.1145/322033.322044)\n  - [Optimal Sequence Alignment Algorithm Using Space Division Technique](https://scienceon.kisti.re.kr/commons/util/originalView.do?cn=JAKO200727543156559\u0026oCn=JAKO200727543156559\u0026dbt=JAKO\u0026journal=NJOU00291531\u0026keyword=%EC%B5%9C%EC%A0%81%20%EC%84%9C%EC%97%B4%EC%A0%95%EB%A0%AC)\n\n## Contributing\n\nWelcome contributions to improve this tool! Here are some ways you can help:\n\n- Reporting issues\n- Adding new features\n- Improving documentation\n\nTo contribute:\n\n1. Fork the repository\n2. Create a new branch (`git checkout -b feature/your-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin feature/your-feature`)\n5. Create a new Pull Request\n\n## Contact\n\nFor any inquiries, please contact [krkarma777@gmail.com](mailto:krkarma777@gmail.com) or open an issue on GitHub.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrkarma777%2Fstring-difference-finder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrkarma777%2Fstring-difference-finder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrkarma777%2Fstring-difference-finder/lists"}