How to take thumbnail of a website using Ruby?

H

Human Dunnil

Hello folks,

How could I take a screenshot of a web site using Ruby on a shared
hosting? There's no X server on the server, is there a way to take a
screenshot using imagemagick or something else?

Thanks,
- Dunnil
 
D

Daniel Lucraft

Human said:
Hello folks,

How could I take a screenshot of a web site using Ruby on a shared
hosting? There's no X server on the server, is there a way to take a
screenshot using imagemagick or something else?

Thanks,
- Dunnil

I'd be surprised if the first step in the easiest way to do this wasn't
(1) install an X server.

This is sort of a way to do it using RubyGnome. But again, needs X, Gtk
and Ruby-gnome: http://rubyurl.com/Yjk

There was definitely a website out there that would take pictures of
your page for you, on different platforms, but I can't seem to find it.
Perhaps it would be possible to hook up with that.

best,
Dan
 
M

Marcin Raczkowski

Hello folks,

How could I take a screenshot of a web site using Ruby on a shared
hosting? There's no X server on the server, is there a way to take a
screenshot using imagemagick or something else?

Thanks,
- Dunnil

well i'm working on scrpt that an do that, but you probably won't be able to
do this without x server.

check this:
http://khtml2png.sourceforge.net/index.php?page=about (uses khtml rendering
engine, not sure if it requires X)
http://pearlcrescent.com/products/pagesaver/ (uses firefox with plugin, I'm
SURE it requires X+Firefox, poblably no way to install plugin on shared
hosting too)


if you wrtite the script, please share your expirience, you can e-mail me
directly ^^

Greets
 
J

John Joyce

What you need is not to take a picture exactly but rather than
rendering it to a monitor, render it to a file.
You could run some instance of a rendering engine. (Gecko for example)
The easiest way is to simply use a browser but there must be another
way.
This is like Snap and it's annoying mouseOver popups
 
K

Kyle Schmitt

You could render it with links :) and no it's not just text only.
There are several versions of links. In particular the links by
twibright labs http://links.twibright.com/ has a graphical rendering
mode. Since it renders to a frame buffer (and doesn't need X) you can
probably render to a raw file or somfin instead, then convert to a
png, and viola, screenshot sans X.

Of course yea, geko and konq also could do this, but I don't know how
common it is to find them detached completely from X.

my 2*$0.01... or what... 2 0.001*euros?

--Kyle
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,237
Messages
2,571,190
Members
47,827
Latest member
wyton

Latest Threads

Top