Skip to content

Commit

Permalink
update docs and gem
Browse files Browse the repository at this point in the history
  • Loading branch information
siuying committed Jun 27, 2010
1 parent f3937f0 commit 9012eb4
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
6 changes: 6 additions & 0 deletions Manifest
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,10 @@ Rakefile
bin/wkhtmltoimage-linux-i386-0.10.0
bin/wkhtmltoimage-proxy
lib/websnap.rb
lib/websnap/source.rb
lib/websnap/websnap.rb
spec/fixtures/google.html
spec/source_spec.rb
spec/spec_helper.rb
spec/websnap_spec.rb
websnap.gemspec
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ Create snapshot of webpage. Uses [wkhtmltoimage](http://github.com/antialize/wkh
## Installation

1. Install wkhtmltoimage (optional)
** WebSnap comes bundled with wkhtmltoimage binaries for Linux i386 and OS X i386
** WebSnap defaults to user installed versions of wkhtmltoimage if found
** Installing wkhtmltoimage binary
*** Download the latest binary from http://code.google.com/p/wkhtmltopdf/downloads/list
*** Place the binary somewhere on your path (e.g /usr/local/bin)

* WebSnap comes bundled with wkhtmltoimage binaries for Linux i386 (OSX i386 will be bundled, when it is available from [wkhtmltopdf] site)
* WebSnap defaults to user installed versions of wkhtmltoimage if found
* Installing wkhtmltoimage binary
* Download the latest binary from http://code.google.com/p/wkhtmltopdf/downloads/list
* Place the binary somewhere on your path (e.g /usr/local/bin)

2. Install WebSnap

$ gem install websnap
Expand All @@ -21,7 +23,7 @@ Create snapshot of webpage. Uses [wkhtmltoimage](http://github.com/antialize/wkh
snap = WebSnap.new('http://google.com', :format => 'png')

# Get the binary image data
png = snap.bytes
png = snap.to_bytes

# Save the PDF to a file
file = snap.to_file('/path/to/save/png')
Expand All @@ -30,6 +32,11 @@ Create snapshot of webpage. Uses [wkhtmltoimage](http://github.com/antialize/wkh
kit = WebSnap.new('http://google.com')
kit = WebSnap.new(File.new('/path/to/html'))

## Attributions

* This application use wkhtmltoimage as backend
* This gem is a clone of PDFKit, which use wkhtmltopdf to generate PDF

## Note on Patches/Pull Requests

* Fork the project.
Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ require 'echoe'
require 'rake'
require 'spec/rake/spectask'

Echoe.new("websnap", "0.1.0") do |p|
Echoe.new("websnap", "0.1.1") do |p|
p.author = "Francis Chong"
p.description = "Create snapshot of webpage"
p.url = "http://github.com/siuying/websnap"
Expand Down

0 comments on commit 9012eb4

Please sign in to comment.