[svn] r5524 - trunk/tools/unoconv
packagers at lists.rpmforge.net
packagers at lists.rpmforge.net
Mon Jun 18 12:07:07 CEST 2007
Author: dag
Date: 2007-06-18 12:07:06 +0200 (Mon, 18 Jun 2007)
New Revision: 5524
Modified:
trunk/tools/unoconv/TODO
trunk/tools/unoconv/unoconv
Log:
Improvements to error output.
Modified: trunk/tools/unoconv/TODO
===================================================================
--- trunk/tools/unoconv/TODO 2007-06-17 22:03:51 UTC (rev 5523)
+++ trunk/tools/unoconv/TODO 2007-06-18 10:07:06 UTC (rev 5524)
@@ -13,6 +13,7 @@
### Usability
- Start OpenOffice automatically to assist conversion and then stop
- Maybe change the commandline interface to reflect ImageMagick's convert
+- Add the list of input formats as well, and print that list too
### Documentation
- Add manpage
Modified: trunk/tools/unoconv/unoconv
===================================================================
--- trunk/tools/unoconv/unoconv 2007-06-17 22:03:51 UTC (rev 5523)
+++ trunk/tools/unoconv/unoconv 2007-06-18 10:07:06 UTC (rev 5524)
@@ -40,7 +40,7 @@
__version__ = "$Revision$"
# $Source$
-VERSION = '0.2'
+VERSION = '0.2svn'
doctypes = ('document', 'graphics', 'presentation', 'spreadsheet')
@@ -242,7 +242,7 @@
self.doctype = None
self.server = 'localhost'
self.port = '2002'
- self.connection = "uno:socket,host=%s,port=%s;urp;StarOffice.ComponentContext" % (self.server, self.port)
+ self.connection = "socket,host=%s,port=%s;urp;StarOffice.ComponentContext" % (self.server, self.port)
self.filenames = []
### Get options from the commandline
@@ -343,7 +343,7 @@
def __init__(self):
context = uno.getComponentContext()
resolver = context.ServiceManager.createInstanceWithContext("com.sun.star.bridge.UnoUrlResolver", context)
- unocontext = resolver.resolve(op.connection)
+ unocontext = resolver.resolve("uno:%s" % op.connection)
unosvcmgr = unocontext.ServiceManager
self.desktop = unosvcmgr.createInstanceWithContext("com.sun.star.frame.Desktop", unocontext)
@@ -463,7 +463,11 @@
except NoConnectException, e:
print >>sys.stderr, "unoconv: could not find an existing connection to Open Office at %s:%s." % (op.server, op.port)
- print >>sys.stderr, "Please start an ooffice instance by doing:\n ooffice -headless -accept=\"socket,host=%s,port=%s;urp;\"" % (op.server, op.port)
+ print >>sys.stderr
+ if op.connection:
+ print >>sys.stderr, "Please start an ooffice instance on server '%s' by doing:\n\n ooffice -headless -accept=\"%s\"" % (op.server, op.connection)
+ else:
+ print >>sys.stderr, "Please start an ooffice instance on server '%s' by doing:\n\n ooffice -headless -accept=\"socket,host=localhost,port=%s;urp;\"" % (op.server, op.port)
exitcode = 1
### Main entrance
More information about the svn-commits
mailing list