src/cm/converters/__init__.py
changeset 77 fe91eb717a96
parent 50 6db6c011a310
child 78 dda94db1149a
--- a/src/cm/converters/__init__.py	Wed Jan 06 16:59:10 2010 +0100
+++ b/src/cm/converters/__init__.py	Mon Jan 11 16:29:48 2010 +0100
@@ -1,6 +1,6 @@
-from oo_converters import convert
 from pandoc_converters import pandoc_convert
 import chardet 
+import re
 
 # TODO: move that in text_base: save images
 def convert_from_mimetype(file_name, mime_type, format):
@@ -87,7 +87,8 @@
     result.append(xhtml[last_index:len(xhtml)])
     return u''.join(result)
 
-def convert_oo_to_html(input):    
+def convert_oo_to_html(input):
+    from oo_converters import convert    
     html_input, images = convert(input, 'html')
     
     enc = chardet.detect(html_input)['encoding']
@@ -103,7 +104,8 @@
         raise Exception('UnicodeDecodeError: could not decode')
     return res_content_html, images
 
-def old_convert_oo_to_html(input):    
+def old_convert_oo_to_html(input): 
+    from oo_converters import convert   
     html_input, images = convert(input, 'html')
     xhtml_input, _not_used_ = convert(input, 'xhtml')