Gist 28617
✓ Published0🌍 Public
CCaged
Last edited Nov 24, 2008
Created on Nov 24, 2008
This example uses a Ruby script to capture full-page screenshots of websites by automating a hidden WebView. It first loads a given URL, waits for the page to finish rendering, then saves the rendered content as a PNG file. The code leverages MacRuby’s WebKit framework, specifically `WebView` and `NSBitmapImageRep`, to render and capture the page. It supports optional width, height, delay, and output filename parameters, with a default width of 1024 pixels and a fallback to ruby-lang.org if no URL is provided.
AI-generated description