Project

webshooter

0.0
No commit activity in last 3 years
No release in over 3 years
This library allows you to create webshots using webkit on MacOSX. A webshot is a screenshot taken inside the browser. The advantage of this library is that it is headless and gives you the real view not a parsed view
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 1.0.0

Runtime

~> 1.4.4
 Project Readme
This library uses the Webkit Ruby Cocoa library to take headless webshots

# Ruby cocoa working
- This means it will only work on the system ruby on mac
- rvm use system (to activate it)

# Installation
gem install webshooter --pre

# Usage 

## From within ruby
require 'webshooter'
Webshooter.capture('http://www.jedi.be',{ :output => 'jedi.png', :width => '1024' , :height => '768' , :delay => '2')

## As a commandline tool
webshooter 'http://www.jedi.be' --width=1024 --height=786 --delay=2 --output=jedi.png

# Limitations
- does not handle redirects currently
- create more configurable options
- cleanup code
- only support png

# Inspiration

This library is a compilation of various parts I found on the web
The research was done a few years ago, so unfortunatly I don't have all the references anymore

- webkit2png - http://www.paulhammond.org/webkit2png/
- http://cocoadevblog.com/webkit-screenshots-cocoa-objective-c


- Darkroom -  Copyright (c) 2007 Justin Palmer.
  - https://gist.github.com/34824 
  - https://gist.github.com/86435

- Thanks to the heavy lifting done by others:
 -  https://gist.github.com/244948
 - http://pastie.caboo.se/69235
 - http://pastie.caboo.se/68511
 - https://gist.github.com/248077 Webview to PDF
 - http://www.bencurtis.com/wp-content/uploads/2008/05/snapper.rb