Skip to content

Commit

Permalink
Added OpenSUSE 10 OpenOffice path /usr/lib*/ooo*/program/ (Leo Eraly)
Browse files Browse the repository at this point in the history
  • Loading branch information
dagwieers committed Jul 18, 2007
1 parent 25fb945 commit a21beea
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 15 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- Created a seperate class and allow to use as a library (like DocumentConverter.py)
- Makefile now adds symlinks for different ODF formats like eg, odt2pdf or odp2pdf
- Added MacOSX NeoOffice path '/Applications/NeoOffice.app/Contents/program/' (Peter Stevens)
- Added OpenSUSE 10 OpenOffice path '/usr/lib*/ooo*/program/' (Leo Eraly)

* 0.2 - released 20/05/2007
- Added support for almost 100 graphics, presentation and spreadsheet documents
Expand Down
1 change: 1 addition & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Other tools that are useful:

+ Another python tool to aid in converting files using UNO
http://www.artofsolving.com/files/DocumentConverter.py
http://www.artofsolving.com/opensource/pyodconverter

---
Please send me improvements to this document.
30 changes: 15 additions & 15 deletions unoconv
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@

import getopt, sys, os, glob

try:
import uno
except:
# extrapaths = ('/usr/lib/openoffice/program/', '/usr/lib/openoffice.org2.0/program/')
extrapaths = glob.glob('/usr/lib*/openoffice*/program/') + [ '/Applications/NeoOffice.app/Contents/program', ]
for path in extrapaths:
if os.path.isfile(os.path.join(path, 'pyuno.so')):
sys.path.append(path)
break
else:
print >>sys.stderr, "unoconv: Cannot find the pyuno.so library in sys.path."
print >>sys.stderr, "Please locate this library and send feedback to <tools@lists.rpmforge.net>."
sys.exit(1)

import uno, unohelper
#extrapaths = ('/usr/lib/openoffice/program/', '/usr/lib/openoffice.org2.0/program/')
extrapaths = glob.glob('/usr/lib*/openoffice*/program/') + glob.glob('/usr/lib*/ooo*/program') + [ '/Applications/NeoOffice.app/Contents/program', ]
for path in extrapaths:
try:
sys.path.append(path)
import uno, unohelper
break
except:
sys.path.remove(path)
continue
else:
print >>sys.stderr, "unoconv: Cannot find the pyuno.so library in sys.path and known paths."
print >>sys.stderr, "Please locate this library and send your feedback to <tools@lists.rpmforge.net>."
sys.exit(1)

from com.sun.star.beans import PropertyValue
from com.sun.star.connection import NoConnectException
from com.sun.star.io import IOException, XOutputStream
Expand Down

0 comments on commit a21beea

Please sign in to comment.