State of Mozilla in Ruby - rbXPCOM, Ruby-Gtk/MozEmbed

Hello,

I have been asking this more times here but did not got even a single
answer - not even a ‘we don’t know’ so please this time send me a ‘we
don’t know’ at least (I have no clue who should send this, though :wink:

ATM i am working on an open-source web extraction product - it will be a
mozilla based screen scraping tool, which will need minimal user
interaction to mine the relevant data (more or less you will have to
draw a box around the data you would like to extract and it will be
extracted automatically). As i am working in a web extraction company
for the 5th year now, i know that this will be a killer app, and my
employer’s 150.000 EUR software is nowhere near this effectivity (at
least not w.r.t the screen scraping part).

This is all very nice, but why i am writing this here? Because so far
this cool product is in Java - for two reasons:

  1. When i begun with it i did not know Ruby
  2. Even if 1) would not true, we had (and still have) every tool we
    needed in Java, whereas this is not true for Ruby(?) Or? This is the
    question i would like to ask.

Alternatively, 1) could be replaced somehow in a fashion that the IDE
would be a mozilla browser and i would call Ruby through JS from the
browser.

The app is based on mozilla, i need 2 things there:

  1. A widget that can be embedded into a GTK (or something equal) Ruby TK
    GUI or alternatively a way to call Ruby code from mozilla
  2. rbXPCOM or something similar binding to access the Mozilla DOM via
    XPCOM.

Basically i need to render a page, and get the nsIDOMDOCument of that
page to get started.

I have already contacted the author of 1), however i have no clue about
2). Does anybody have idea about it, or about the whole stuff in general
(i.e. if it could be moved from Java to Ruby)

It would be a pity to not gain some + attention to Ruby through this,
since i would like to launch a web portal with this product later, and
if i can not do it in Ruby, i has to stay with Java (which i don’t
really like anyway, mainly when compared to Ruby)

Cheers,
Peter

This goes to the second 1):

Alternatively, 1) could be replaced somehow in a fashion that the IDE
would be a mozilla browser and i would call Ruby through JS from the
browser.
here:

Hi,

On Sat, 6 May 2006 20:59:56 +0900
Peter S. [email protected] wrote:

Hello,

The app is based on mozilla, i need 2 things there:

  1. A widget that can be embedded into a GTK (or something equal) Ruby TK
    GUI or alternatively a way to call Ruby code from mozilla
  2. rbXPCOM or something similar binding to access the Mozilla DOM via
    XPCOM.

Ruby/GtkMozEmbed has already been included Ruby-GNOME2.
And there is a movie to build mozilla based WWW browser using
Ruby-GNOME2.
http://ruby-gnome2.sourceforge.jp/hiki.cgi?RubyZilla

Though, it’s not support rbXPCOM.

Ruby/GtkMozEmbed has already been included Ruby-GNOME2.
And there is a movie to build mozilla based WWW browser using Ruby-GNOME2.
http://ruby-gnome2.sourceforge.jp/hiki.cgi?RubyZilla

Though, it’s not support rbXPCOM.

Thx for the answer. So it seems my question is reduced to ‘how can i get
access
the mozilla DOM of a page which has been rendered inside a Ruby-GNOME2
based
WWW browser’

C’mon guys, is this really impossible in Ruby ATM? I can’t believe Java
beats Ruby in this…

Cheers,
Peter

Quoting Peter S. [email protected]:

What about trying Korundum and building the web browser around KHTML? If
it
works for Apple, it could work for you.

C’mon guys, is this really impossible in Ruby ATM? I can’t believe
Java beats Ruby in this…

Of course it’s not impossible! You just have to improve GtkMozEmbed
yourself. =) You should also look into Korundum, I suppose.

I know that this is definitely not impossible, since it was done in C,
Java, and even Python (PyXPCOM), i even know how to do it, but i don’t
have time for it (I have very limited time even for the ‘parent’
project, and writing rbXPCOM or similar does not fit into this at
all…)

OK, i will try to propose this for the google SOC (PyXPCOM was proposed
last summer, too) and i’ll see. Well, if not… I guess i will have to
stick with java (…sigh…)

Cheers,
Peter

Peter S. [email protected] writes:

Ruby/GtkMozEmbed has already been included Ruby-GNOME2.
And there is a movie to build mozilla based WWW browser using Ruby-GNOME2.
http://ruby-gnome2.sourceforge.jp/hiki.cgi?RubyZilla

Though, it’s not support rbXPCOM.

Thx for the answer. So it seems my question is reduced to ‘how can i
get access the mozilla DOM of a page which has been rendered inside
a Ruby-GNOME2 based WWW browser’

I was playing a bit with the Ruby GtkMozEmbed bindings, and it seemed
they were rather superficial. That is, you could drop a mozilla widget
into your app, and said widget could browse just like real Mozilla,
but the interaction between Ruby and the widget was more on the level
of “browse this url” and “what url are you at now?” rather than
offering any access to the contents of the DOM itself or even such
basic things as scrolling the Mozilla widget.

Of course, I was just looking at the documentation and not at the
source itself. Perhaps it has more features that are undocumented.

C’mon guys, is this really impossible in Ruby ATM? I can’t believe
Java beats Ruby in this…

Of course it’s not impossible! You just have to improve GtkMozEmbed
yourself. =) You should also look into Korundum, I suppose.

-Phil