A way to convert RTF to HTML?

2009-12-27 Thread Star Glider
Hi,

I'm converting an application to Python/PyQt, one of the tasks is to
retrive data from a database and show it, no problem,
the problem is that the one of the fields as text in rich text format,
and it needs to be display without the RTF markup, of course.
Is there any way to convert RTF to HTML?

Thank you in advance.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: A way to convert RTF to HTML?

2009-12-27 Thread Tim Wintle
On Sun, 2009-12-27 at 20:10 +, Star Glider wrote:
 the problem is that the one of the fields as text in rich text format,
 and it needs to be display without the RTF markup, of course.
 Is there any way to convert RTF to HTML?


Depending on how precisely you need to lay it out you might find it
relatively easy to do yourself (The spec is available online).

I wrote a very simple parser recently as part of a graffle2svg - it
ignores most styling options, but applies some of the styles in css.

http://code.google.com/p/graffle2svg/

- feel free to take rtf.py from that project under the BSD license if
it's helpful.



-- 
http://mail.python.org/mailman/listinfo/python-list