{"id":15512287,"url":"https://github.com/mgrachev/gastly","last_synced_at":"2025-10-12T09:30:38.089Z","repository":{"id":34940996,"uuid":"39013325","full_name":"mgrachev/gastly","owner":"mgrachev","description":"👻 Create screenshots or previews of web pages","archived":true,"fork":false,"pushed_at":"2021-01-16T09:23:13.000Z","size":246,"stargazers_count":128,"open_issues_count":0,"forks_count":17,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-10-07T18:32:45.504Z","etag":null,"topics":["minimagick","phantomjs","pokemon","ruby","screenshot"],"latest_commit_sha":null,"homepage":"https://www.mgrachev.com/projects","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/mgrachev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-13T13:22:20.000Z","updated_at":"2024-10-27T19:26:30.000Z","dependencies_parsed_at":"2022-09-09T07:50:20.159Z","dependency_job_id":null,"html_url":"https://github.com/mgrachev/gastly","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/mgrachev/gastly","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgrachev%2Fgastly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgrachev%2Fgastly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgrachev%2Fgastly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgrachev%2Fgastly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mgrachev","download_url":"https://codeload.github.com/mgrachev/gastly/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgrachev%2Fgastly/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010938,"owners_count":26084837,"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-10-12T02:00:06.719Z","response_time":53,"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":["minimagick","phantomjs","pokemon","ruby","screenshot"],"created_at":"2024-10-02T09:53:34.236Z","updated_at":"2025-10-12T09:30:37.807Z","avatar_url":"https://github.com/mgrachev.png","language":"Ruby","readme":"# 👻 Gastly\n\n[![Gem Version](https://badge.fury.io/rb/gastly.svg)](http://badge.fury.io/rb/gastly)\n[![Code Climate](https://codeclimate.com/github/mgrachev/gastly/badges/gpa.svg)](https://codeclimate.com/github/mgrachev/gastly)\n[![Build Status](https://travis-ci.org/mgrachev/gastly.svg?branch=master)](https://travis-ci.org/mgrachev/gastly)\n[![Coverage Status](https://coveralls.io/repos/github/mgrachev/gastly/badge.svg?branch=master)](https://coveralls.io/github/mgrachev/gastly?branch=master)\n\nCreate screenshots or previews of web pages using Gastly. Under the hood [Phantom.js](https://github.com/ariya/phantomjs/) and [MiniMagick](https://github.com/minimagick/minimagick).\n\nGastly, I choose you!\n\n![Gastly](https://github.com/mgrachev/gastly/raw/master/gastly.png)\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'gastly'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install gastly\n\n## Usage\n\n```ruby\nGastly.capture('http://google.com', 'output.png')\n```\n\nIt's also possible to further customize the creation of screenshots and further processing of the resulting image:\n\n```ruby\nscreenshot = Gastly.screenshot('http://google.com')\nscreenshot.selector = '#hplogo' # By default, the full screen is captured\nscreenshot.browser_width = 1280 # Default: 1440px\nscreenshot.browser_height = 780 # Default: 900px\nscreenshot.timeout = 1000 # Default: 0 seconds\nscreenshot.cookies = { user_id: 1, auth_token: 'abcd' } # If you need\nscreenshot.proxy_host = '10.10.10.1' # If you want to use a http proxy\nscreenshot.proxy_port = '8080'\nscreenshot.phantomjs_options = '--ignore-ssl-errors=true'\nimage = screenshot.capture\n```\n\nOr\n\n```ruby\nscreenshot = Gastly.screenshot('http://google.com', selector: '#hplogo', timeout: 1000)\nimage = screenshot.capture\n```\n\nYou can resize, crop or change the format of the screenshot:\n\n```ruby\nimage = screenshot.capture\nimage.crop(width: 250, height: 250, x: 10, y: 0) # Crop with an offset\nimage.resize(width: 110, height: 110) # Creates a preview of the web page\nimage.format('png')\nimage.save('output.png')\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\n1. Fork it ( https://github.com/mgrachev/gastly/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n","funding_links":[],"categories":["Ruby"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgrachev%2Fgastly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmgrachev%2Fgastly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgrachev%2Fgastly/lists"}