0
     )ˆÕÔÙ445ÓÀ× ½    )‹      �“Qo›0…ßû+îü°·pCH÷ÐODZ¤4‰R¦jªú`°k€‘í,Ký djV5Z×lðw�Ï¹ÆôC¼Š’ïë|Mn°þöe1�€Œïƒ1Nâaaê�}ÄÙ’ )�k¯w»�·<m
L6Xººš¢uFeÎNvAûoìh)¹èF N¹J²y#ä/Ð9 Þ:«„œâÖ¬TŠf›î1ð|o|˜²¶¨[×rc%Å¡¼Ä£"MµØ÷ùïíjÖxzÐî§†QWÂO^©¢	‰Ó-aTÕX“…U¦‹iÅ›^¡r¼r!y˜G«ÇŽCWöÕŒr(�ÌCò9
—×«ð†°%¯»ýøëÌíÀ,¸uPk¡r%ÅYøn€ïÔÓyÁ¸cbÂbi3£Z§tóŒbñ4j¦+Ûò.ëe— 4§Ô€ˆuƒg5c}³™-“x¾Z"z‰gwo;"ÂÖÜÈÆA¬ŒÌœ6ûc€Aíc“ÚöúÏ+íU”Ž0€¼JþG¦\WBšÓTçòô	ëŸ§_XšŒ'ŸF¾?š0¾¼š ïòþÆSÃãÿLñpE(wñ7”Q•èî       +ˆÕÔÙ‚l@ÓÀ×     +‹      ½”]oÛ †ïû+»³O>7µµ™º8Ò"¥I”ºÚ¦iÄCkƒdi÷ë‡ãDu§dÚÇ•9ø1ç}_0Ñ‹d>J?.Æè]z=E‹Û·ÓÉá à}�¤Ióbvº ãFX8W] l·ÛpÛµÉ!]‚pe1 ëŒÌ\ÈÃä,ªçÈŠ§Ì?Qä¤+8™(Æ�^#Ðg%ã~åj³*dv˜ ¦K–+¶–/u(l˜i]ùFLg6°¶8ÐØXVPÃAiÆï,jƒ�’™¯"hºz°­4{¬õuÿ»ßr]í$ÕCC"'ÐZÈ\ÅØé
“H–9²&‹1øï”…UAÕ}˜Ë5F´p1þ4Í?{œ¨¿&EÂðuŒßŒâÙå<N0™ÑÒ÷£Ç™kÏ\a2¥Ö¡R3¹–œ�„oøF~=½`Ò0	·™‘•“Z=¡à-¶­fº°õ^‡Þ�0mªAØÏÒ Ù³0WËñ,M&Ë&V/ñ¤îßí,&_)‡ixæ´yÜ›n¼T+[]J´·dd.&è(ù98þàÚ9¤Ò£	Èú�‡w“Ã¨­ó;a½N¯t{Ag€ºçÃB'ÀWÃ×ì`£î•Þª¶	PŽš¨ü¦Óœ{ñZaÒ®þŠ™þùÌüâá…ýoÁî‚‰ ¹ ¿i‘¹c    6   -ˆl–Ü4ý('ÔD¨ õÝÀ;q¦”Å£�þe}èÖmöäÀQÈ ùÛ„q—žgÚÁØ ?÷     -#!/usr/bin/env python3

### This program is free software; you can redistribute it and/or modify
### it under the terms of the GNU General Public License as published by
### the Free Software Foundation; version 2 only
###
### This program is distributed in the hope that it will be useful,
### but WITHOUT ANY WARRANTY; without even the implied warranty of
### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
### GNU General Public License for more details.
###
### You should have received a copy of the GNU General Public License
### along with this program; if not, write to the Free Software
### Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
### Copyright 2007-2010 Dag Wieers <dag@wieers.com>

from __future__ import print_function

from distutils.version import LooseVersion
import getopt
import glob
import os
import subprocess
import sys
import time

__version__ = '0.7'

doctypes = ('document', 'graphics', 'presentation', 'spreadsheet')

global convertor, office, ooproc, product
ooproc = None
uno = unohelper = None
exitcode = 0

class Office:
    def __init__(self, basepath, urepath, unopath, pyuno, binary, python, pythonhome):
        self.basepath = basepath
        self.urepath = urepath
        self.unopath = unopath
        self.pyuno = pyuno
        self.binary = binary
        self.python = python
        self.pythonhome = pythonhome

    def __str__(self):
        return self.basepath

    def __repr__(self):
        return self.basepath

### Implement a path normalizer in order to make unoconv work on MacOS X
### (on which 'program' is a symlink to 'MacOSX' which seems to break unoconv)
def realpath(*args):
    ''' Implement a combination of os.path.join(), os.path.abspath() and
        os.path.realpath() in order to normalize path constructions '''
    ret = ''
    for arg in args:
        ret = os.path.join(ret, arg)
    return os.path.realpath(os.path.abspath(ret))

### The first thing we ought to do is find a suitable Office installation
### with a compatible pyuno library that we can import.
###
### See: http://user.services.openoffice.org/en/forum/viewtopic.php?f=45&t=36370&p=166783

def find_offices():
    ret = []
    extrapaths = []

    ### Try using UNO_PATH first (in many incarnations, we'll see what sticks)
    if 'UNO_PATH' in os.environ:
        extrapaths += [ os.environ['UNO_PATH'],
                        os.path.dirname(os.environ['UNO_PATH']),
                        os.path.dirname(os.path.dirname(os.environ['UNO_PATH'])) ]

    else:

        if os.name in ( 'nt', 'os2' ):
            if 'PROGRAMFILES' in list(os.environ.keys()):
                extrapaths += glob.glob(os.environ['PROGRAMFILES']+'\\LibreOffice*') + \
                              glob.glob(os.environ['PROGRAMFILES']+'\\OpenOffice.org*')

            if 'PROGRAMFILES(X86)' in list(os.environ.keys()):
                extrapaths += glob.glob(os.environ['PROGRAMFILES(X86)']+'\\LibreOffice*') + \
              