NetAngels / django-webodt

django module to create MS Word, PDF and other types of documents from ODF and HTML templates
http://packages.python.org/django-webodt/
93 stars 52 forks source link

Added new simpler convertor for OO #13

Open koszta5 opened 11 years ago

koszta5 commented 11 years ago

Hi, I enhanced your library with a lot simpler convertor using OO. Why did i do it since we have OO converter already?

  1. It is the ONLY way to make your library convert documents on Mac OS X
    • abiword for Intel is not to be found (and compiling it on Macports or elsewhere is a big PAIN)
    • gdrive has issues (table borders) --> http://goo.gl/B8B5B
    • PyUNO is broken on Mac OS (and elsewhere as I hear - http://goo.gl/3MzNm)
  2. It is much more see-through code than using pyuno magic. I used "Abiword converter template"

Tested and working Mac OS 10.7 Server; Ubuntu 12.10

I order to make this all work you need to set in settings.py: WEBODT_CONVERTER = 'webodt.converters.openofficebin.OpenOfficeBinODFConverter' WEBODT_OOBIN_COMMAND = '/Applications/LibreOffice.app/Contents/MacOS/soffice'

Also on Mac OS it is needed to set a temp folder OUTSIDE /var e.g. WEBODT_TMP_DIR = "/Users/kosta/git/my_project/resources/tmp_webodt" (OO has problems with rights)