With web-snapshooter you can make those web-thumnails you always dreamed of. It allows to specify the browser size and the output size. It permits both jpg and png and 2 different engines (mozilla and webkit). You can also use it without the need of an X server, if you have installed xvfb it will take care of the creation of a dummy server where the render can be done.
First you have to install dependencies
sudo aptitude install libgtk2.0-dev # you have to install gtk2 and its development libraries sudo gem install gtk2
sudo aptitude install xulrunner-dev sudo gem install gtkmozembed
sudo aptitude install libwebkit-dev git clone https://github.com/magec/rbwebkitgtk cd rbwebkitgtk && ruby extconf.rb && make && sudo make install
git clone git://github.com/magec/web-snapshooter.git cd web-snapshooter && gem build *gemspec && sudo gem install *.gem
Xvfb (in case you want to run it without a X server)
sudo aptitude install xvfb
Usage: web-snapshooter [options] -u, --uri URI The uri you want to take the spanshot from -e, --engine [webkit|mozilla] Select the engine to be used (default is webkit) -f, --force Overwrite output -o, --output-file FILE The output file --browser-size WIDTHxHEIGHT The size of the 'fake' browser that is going to be used to capture the snapshot, if not specified the output size will be used instead --output-size WIDTHxHEIGHT The size of the output file, if not specified the browser size will be used instead -x, --xvfb Use xvfb-run (this is needed if you have no X server or don't want to use it) -t, --timeout TIMEOUT timeout for the request
Contributing to web-snapshooter
Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
Fork the project
Start a feature/bugfix branch
Commit and push until you are happy with your contribution
Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
Copyright © 2011 Jose Fernandez (magec). See LICENSE.txt for further details.