Reply
Thread Tools
ezuall's Avatar
Posts: 15 | Thanked: 0 times | Joined on Mar 2007
#1
All,

I've started work on uGly Mail. It's basically a very simple thumb-friendly frontend for GMail. I'm using PyGTK and libgmail at present, but I need some way of Rendering HTML emails.

Do you have any suggestions and would GtkHTML be an option here?

I've had a quick search through the forum for a an answer, but if I missed it just point me at the correct thread.

Regards
ezuall
 
Posts: 468 | Thanked: 610 times | Joined on Jun 2006
#2
I don't have any experience in implementing anything like this, but as far as I know there aren't any pure python HTML rendering libraries.

On a normal linux Gnome installation you can use PyGtkMoz bindings to render HTML
http://patrick.wagstrom.net/tutorial...kmozembed.html

This probably won't work out of the box on Maemo, but since the new webbrowser is Mozilla based, you may be able to get it working (please post your findings, I would very much like to know)

There was a pure python webbrowser made a few years ago: Grail
Sadly it isn't maintained anymore, and it only supported HTML 3.2 without javascript. It doesn't function correctly on newer python releases (it was made using python 1.5 if I'm not mistaken).
So using that code as a html renderer will probably need a lot of work. http://grail.sourceforge.net/

Last edited by Bernard; 2007-11-24 at 12:03.
 

The Following User Says Thank You to Bernard For This Useful Post:
ezuall's Avatar
Posts: 15 | Thanked: 0 times | Joined on Mar 2007
#3
Thank you, I'll look into these.
 
Posts: 4 | Thanked: 3 times | Joined on Nov 2007
#4
Or, since gtkhtml is included in maemo SDK, you could maybe try to compile and use the python gtkhtml bindings from gnome-python-extras (http://svn.gnome.org/viewvc/gnome-py...nk/gtkhtml2/)?
 
yerga's Avatar
Posts: 696 | Thanked: 1,012 times | Joined on Mar 2006 @ Asturies, Spain
#5
I compiled in chinook python-gtkhtml2 from gnome-python-extras (and btw libgtkhtml2 and libgail).

It works well in OS2008. Not tested in other versions.
If tomorrow I have time I will do a package for it.

The gtkhtml example looks so in gnome.org:
Attached Images
  
__________________
Daniel Martín Yerga
maemo.org profile
Twitter
 

The Following 2 Users Say Thank You to yerga For This Useful Post:
Khertan's Avatar
Posts: 1,012 | Thanked: 817 times | Joined on Jul 2007 @ France
#6
As i am an python developer i say thanks for the compilation of "python-gtkhtml2" !
 
yerga's Avatar
Posts: 696 | Thanked: 1,012 times | Joined on Mar 2006 @ Asturies, Spain
#7
I uploaded the armel deb compiled packages to maemo garage: http://garage.maemo.org/projects/python-gtkhtml2/
It needs first libgail, libgail-common and libgtkhtml2. These packages can't be installed with Aplication Manager.

Soon I will upload all packages to extras-devel repository.
And source code for gnome-python-extras (renamed to python-gtkhtml2). I only modified the debian directory for compile only the gtkhtml2 module. A bit rude but it worked.
__________________
Daniel Martín Yerga
maemo.org profile
Twitter
 

The Following User Says Thank You to yerga For This Useful Post:
Posts: 468 | Thanked: 610 times | Joined on Jun 2006
#8
very very cool
 
yerga's Avatar
Posts: 696 | Thanked: 1,012 times | Joined on Mar 2006 @ Asturies, Spain
#9
One more thing, I think that it only works in OS2008/Chinook.
Libgtkhtml2 needs Cairo support for compile and it is only avalaible for Chinook.
__________________
Daniel Martín Yerga
maemo.org profile
Twitter
 
Reply

Tags
gtkhtml2, python


 
Forum Jump


All times are GMT. The time now is 19:13.