[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Simple HTML Renderer / Browser?

Randy Kramer

2/24/2005 4:31:00 PM

I need a simple HTML renderer (to get started--eventually, I want to be able
to interface to the gecko, khtml, and possibly other renderers/browsers, but
for now I'm looking for something simple that won't be too hard for me (as a
Ruby newbie) to get working).

Suggestions?

Current Questions:

I have been doing some research and have some thoughts / questions:

* tkhtml () sounds like a possibility, but I don't know if there is a Ruby
interface to it--I 've been searching the web and reading up on Tk in Teach
Yourself Ruby in 21 Days and Programming Ruby. Anybody have any experience
with it (in Ruby).

* Programming Ruby says I can access a Tk widget by prefixing it with
Tk--is that all that has to be done (along with whatever you get with
'require Tk') or does that depend on someone having created a Ruby
"interface" specifically for tkhtml beforehand?

* If I use tkhtml I should name it something like Tktkhtml based on what
the book says? (Uncertain about the double tk and capitalization in
general.)

As I said, someday I'll want to use khtml (kde/qt) and gecko (Gtk) but I'm
afraid Gtk and qt would overwhelm me at this point. I'd like to stay in a
simpler (and lighter) GUI family, like Tk or Fox (at least I'm assuming they
are simpler and lighter).

Ideally, it would be nice to find a "cookbook" example, where I could copy
some code verbatim to get something working, then expand from there.

Simple rendering will do to start, for an application I'm envisioning, I'll
eventually want both multiple renderers and at least one full-fledged
browser.

Randy Kramer


17 Answers

Luke Graham

2/25/2005 12:34:00 AM

0

On Fri, 25 Feb 2005 01:31:24 +0900, Randy Kramer <rhkramer@gmail.com> wrote:

> As I said, someday I'll want to use khtml (kde/qt) and gecko (Gtk) but I'm
> afraid Gtk and qt would overwhelm me at this point. I'd like to stay in a
> simpler (and lighter) GUI family, like Tk or Fox (at least I'm assuming they
> are simpler and lighter).

Im hopelessly biased of course, but Qt really is very easy to learn.
I dont know much about the KDE layers on top of it but there
are Ruby wrappers for both. You probably already knew that tho.

Just remember the simple rhyme:
stay away from gtk
qt is a cutie

:D

--
spooq


Joel VanderWerf

2/25/2005 12:41:00 AM

0

Luke Graham wrote:
> Just remember the simple rhyme:
> stay away from gtk
> qt is a cutie

Tk's Ok,
Fox Rox!

SCNR. Fox doesn't have a HTML widget yet, AFAIK. See
http://www.fox-toolkit.or....


Alexander Kellett

2/25/2005 9:31:00 AM

0

On Feb 24, 2005, at 5:31 PM, Randy Kramer wrote:
> I need a simple HTML renderer (to get started--eventually, I want to
> be able
> to interface to the gecko, khtml, and possibly other
> renderers/browsers, but
> for now I'm looking for something simple that won't be too hard for me
> (as a
> Ruby newbie) to get working).

rendering a piece of html with korundum/khtml is a
matter of just a few lines. interested in the code?

Alex



Randy Kramer

2/25/2005 12:21:00 PM

0

On Friday 25 February 2005 04:31 am, Alexander Kellett wrote:
> rendering a piece of html with korundum/khtml is a
> matter of just a few lines. interested in the code?

Alex,

Yes, please! ;-)

Randy Kramer


Alexander Kellett

2/25/2005 4:34:00 PM

0

On Feb 25, 2005, at 1:21 PM, Randy Kramer wrote:
> On Friday 25 February 2005 04:31 am, Alexander Kellett wrote:
>> rendering a piece of html with korundum/khtml is a
>> matter of just a few lines. interested in the code?
>
> Alex,
> Yes, please! ;-)

hehe :)

for a complex application using it see:
www.lypanov.net/websitedata/RubberDoc-0.2.7.tbz2
just extracting the basics i guess its something like:
require 'Korundum'
about = KDE::AboutData.new("one", "two", "three")
KDE::CmdLineArgs.init(1, ["RubberDoc"], about)
app = KDE::Application.new()
m = KDE::MainWindow.new
htmlview = KDE::HTMLPart.new m
htmlview.openURL KDE::URL.new("")

(untested, if there are any problems i think richard
will be able to help :) - i'm unable to test at the
moment for various reasons)

Alex



Jeremy Henty

2/25/2005 8:00:00 PM

0

Joel VanderWerf wrote:
> Luke Graham wrote:
>> stay away from gtk
>> qt is a cutie
> Tk's Ok,
> Fox Rox!
FLTK is ... er, ... um, ... *darn*!

Randy Kramer

2/26/2005 3:04:00 PM

0

On Friday 25 February 2005 06:04 pm, you wrote:
> in the mean time if you get stuck

Yup!

I'm having trouble installing korundum (on Mandrake 10.0). I couldn't find an
rpm, so I downloaded the tar file (3.3.1). I was going to try the
standard ./configure, make, make install route, but ./configure doesn't
work--there are two configure files, configure.in.in and configure.in.bot.
Neither is executable. Autoconf 1.7 is not installed on Mandrake 10 (maybe
that's the problem??).

Also, kde is at 3.2.1 on Mandrake 10--which makes me wonder, will korundum
3.3.1 work with that?

I hope to have the Mandrake 10.1 disks in a week or so, maybe that will make
things easier (I don't have any plans/hope of updating kde 3.2 to 3.3. other
than by installing Mandrake 10.1 (I tried things like that back in the
Mandrake 6.1-7.2 days, it was just an exercise in frustration).

In the meantime (pending any helpful insights) I'll go back to trying to get
TkHTML to work (by finding a cookbook example).

regards,
Randy Kramer

PS: The tutorial looks helpful, but doesn't (AFAICS) address installing
korundum.

> i was just reading over the latest
> version of the docs page that richards
> been working on and found this wonderful
> little tutorial:
> http://developer.kde.org/language-bindings/ruby/kde3tutori...
> basically exactly what you wanted :)
> glad to be of help :)
> Alex
>
> On Feb 25, 2005, at 10:20 PM, Randy Kramer wrote:
> > On Friday 25 February 2005 11:33 am, Alexander Kellett wrote:
> >> hehe :)
> >
> > Alex,
> >
> > Thanks for your prompt reply! I'm downloading RubberDoc and hope that
> > between
> > that and the the basics below, I hope to get something working soon.
> >
> > If I do have any questions, I'll ask on the list. (I assume Richard
> > hangs out
> > there.)
> >
> > regards,
> > Randy Kramer
> >
> > ---<good stuff snipped>---


Randy Kramer

2/26/2005 7:36:00 PM

0

On Saturday 26 February 2005 10:33 am, you wrote:
> can you try make -f Makefile.cvs before configure?
> we should make this more obvious in the documentation :)
> a wiki would be a good path for installation docs i
> think... i'll ask richard about this.

Thanks, that's helped--make has been chugging along for close to 3 hours now.
(Not quite like the good ol' Turbo Pascal days ;-)

I did have to upgrade autoconf and automake, but fortunately (for me), there
were RPMs on the Mandrake 10 install disks.

regards,
Randy Kramer


Alexander Kellett

2/26/2005 7:40:00 PM

0

next time use a distribution with a prebuilt package :)
(we simply don't have the man power to build these ourselves,
too many distributions too little time :( )

On Feb 26, 2005, at 8:35 PM, Randy Kramer wrote:
> On Saturday 26 February 2005 10:33 am, you wrote:
>> can you try make -f Makefile.cvs before configure?
>> we should make this more obvious in the documentation :)
>> a wiki would be a good path for installation docs i
>> think... i'll ask richard about this.
>
> Thanks, that's helped--make has been chugging along for close to 3
> hours now.
> (Not quite like the good ol' Turbo Pascal days ;-)
>
> I did have to upgrade autoconf and automake, but fortunately (for me),
> there
> were RPMs on the Mandrake 10 install disks.
>
> regards,
> Randy Kramer



Detlef Reichl

2/26/2005 9:34:00 PM

0

On Fr, 2005-02-25 at 09:33 +0900, Luke Graham wrote:
>Just remember the simple rhyme:
>stay away from gtk
>qt is a cutie
>
absolute bullshit...

Ruby-gtk+/gnome are very nice bindings to Gtk+ / GNOME wich provide
almost all widgets you need.

before you ever else write such things you'll take a look at the
advantages of the alternatives.

cheers
detlef