add a wrapper of html2text

This commit is contained in:
Romain Bignon 2010-04-11 19:45:12 +02:00
commit 3c4ea6f451
2 changed files with 7 additions and 1 deletions

View file

@ -28,10 +28,10 @@ from email import message_from_file
import time
import re
import sys
from html2text import html2text
from weboob.capabilities.messages import ICapMessages
from weboob.tools.application import ConsoleApplication
from weboob.tools.misc import html2text
class Monboob(ConsoleApplication):
APPNAME = 'monboob'

View file

@ -43,3 +43,9 @@ def local2utc(d):
d = d.replace(tzinfo=tz.tzlocal())
d = d.astimezone(tz.tzutc())
return d
try:
from html2text import html2text
except ImportError:
def html2text(s):
return s