{"id":23669249,"url":"https://github.com/hogelog/chrome_diff","last_synced_at":"2025-07-05T06:04:09.454Z","repository":{"id":56843476,"uuid":"186139659","full_name":"hogelog/chrome_diff","owner":"hogelog","description":null,"archived":false,"fork":false,"pushed_at":"2020-11-01T16:16:26.000Z","size":29,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-12T00:25:17.061Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/hogelog.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-11T14:00:04.000Z","updated_at":"2021-10-19T15:20:38.000Z","dependencies_parsed_at":"2022-09-07T11:41:01.944Z","dependency_job_id":null,"html_url":"https://github.com/hogelog/chrome_diff","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hogelog%2Fchrome_diff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hogelog%2Fchrome_diff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hogelog%2Fchrome_diff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hogelog%2Fchrome_diff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hogelog","download_url":"https://codeload.github.com/hogelog/chrome_diff/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231713652,"owners_count":18415285,"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":[],"created_at":"2024-12-29T08:19:14.657Z","updated_at":"2024-12-29T08:19:15.323Z","avatar_url":"https://github.com/hogelog.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ChromeDiff\n[![Gem Version](https://badge.fury.io/rb/chrome_diff.svg)](https://badge.fury.io/rb/chrome_diff)\n\nVisual diff tool powered by headless chrome.\n\nThis tool controls Chrome by [Chrome DevTools Protocol](https://chromedevtools.github.io/devtools-protocol/) based on [Ferrum](https://github.com/rubycdp/ferrum).\n\n## Installation\n\n```console\n$ gem install chrome_diff\n```\n\n## Requirements\n- Google Chrome (or Chromium)\n- ImageMagick\n\n## Usage\n\n### Command-line\n```console\n$ chrome-diff -f \"https://google.com/?q=hello\" -t \"https://google.com/?q=world\"\nThere are some diffefences (1.44%): diff.png\n```\n\n#### Options\n\n```console\nUsage: chrome-diff [options]\n    -f, --from-url [FROM_URL]        From url\n    -t, --to-url [TO_URL]            To url\n    -o, --output [OUTPUT]            Output file\n    -w, --width [WIDTH]              Window width (default 800)\n    -h, --height [HEIGHT]            Window height (default 600)\n    -q, --quiet                      Quiet mode\n        --threshold [THRESHOLD]      Threshold percent (default 1%)\n        --debug                      Debug mode (default false)\n        --no-output                  Don't output diff file\n        --full-screenshot            Capture full screenshot\n```\n\n### As library\n\n```ruby\nsession = ChromeDiff::Session.new\nsession.compare(\"https://example.com/\", \"https://www.google.com/\")\n```\n\n#### Customize\n\n```ruby\nsession = ChromeDiff::Session.new(width: 800, height: 600, timeout: 5, debug: false)\nsession.compare(from_url: from_url, to_url: to_url, output: \"diff.png\", threshold: 1, full_screenshot: false)\n```\n\n- `width`: window width (default 800px)\n- `height`: window height (default 600px)\n- `timeout`: browser timeout (default 5 seconds)\n- `debug`: debug mode (default false)\n- `from_url`: from url (required)\n- `to_url`: to url (required)\n- `output`: output diff image (default diff.png)\n- `threshold`: threshold percent (default 1%)\n- `full_screenshot`: take full screenshot (default false) \n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/hogelog/chrome_diff.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhogelog%2Fchrome_diff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhogelog%2Fchrome_diff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhogelog%2Fchrome_diff/lists"}