[svn] r6355 - in trunk/tools/unoconv: . tests
packagers at lists.rpmforge.net
packagers at lists.rpmforge.net
Thu Jun 12 01:21:52 CEST 2008
Author: dag
Date: 2008-06-12 00:21:52 +0100 (Thu, 12 Jun 2008)
New Revision: 6355
Modified:
trunk/tools/unoconv/ChangeLog
trunk/tools/unoconv/README
trunk/tools/unoconv/TODO
trunk/tools/unoconv/tests/Makefile
trunk/tools/unoconv/unoconv
Log:
Added -S/--sleep option to influence waiting for OpenOffice to be ready (default: 2 secs)
Modified: trunk/tools/unoconv/ChangeLog
===================================================================
--- trunk/tools/unoconv/ChangeLog 2008-06-11 21:41:12 UTC (rev 6354)
+++ trunk/tools/unoconv/ChangeLog 2008-06-11 23:21:52 UTC (rev 6355)
@@ -1,6 +1,7 @@
* 0.3svn - released 10/04/2008
- Now properly check if there is a GUI attached and terminate() or -unaccept instance
- Added official OpenOffice path '/opt/openoffice*/program'
+- Added -S/--sleep option to influence waiting for OpenOffice to be ready (default: 2 secs)
* 0.3 - released 31/08/2007
- Determine doctype from input filename (if not specified)
Modified: trunk/tools/unoconv/README
===================================================================
--- trunk/tools/unoconv/README 2008-06-11 21:41:12 UTC (rev 6354)
+++ trunk/tools/unoconv/README 2008-06-11 23:21:52 UTC (rev 6355)
@@ -34,6 +34,7 @@
same version of python that you are using to load it. A lot of people that
run into problems loading pyuno are actually using a precompiled OpenOffice
that they downloaded somewhere and is incompatible with their python version.
+(Sometimes the OpenOffice comes with its own python wrapper.)
Other tools that are useful or similar in operation:
Modified: trunk/tools/unoconv/TODO
===================================================================
--- trunk/tools/unoconv/TODO 2008-06-11 21:41:12 UTC (rev 6354)
+++ trunk/tools/unoconv/TODO 2008-06-11 23:21:52 UTC (rev 6355)
@@ -13,3 +13,7 @@
### Usability
- Maybe change the commandline interface to reflect ImageMagick's convert
- Add the list of input formats as well, and print that list too
+
+### Known bugs
+- On some systems loading OpenOffice is slow and this could lead to random errors
+-
Modified: trunk/tools/unoconv/tests/Makefile
===================================================================
--- trunk/tools/unoconv/tests/Makefile 2008-06-11 21:41:12 UTC (rev 6354)
+++ trunk/tools/unoconv/tests/Makefile 2008-06-11 23:21:52 UTC (rev 6355)
@@ -11,7 +11,7 @@
%:
# -killall ooffice soffice.bin
- -../unoconv -vv -f $@ document-example.odt
+ -../unoconv -vvvv -f $@ document-example.odt
# @ps aux | grep office
# -unoconv -f $@ dag.gif
# docbook2pdf -d curriculum-vitae.dsl#print curriculum-vitae-dag-wieers.xml
Modified: trunk/tools/unoconv/unoconv
===================================================================
--- trunk/tools/unoconv/unoconv 2008-06-11 21:41:12 UTC (rev 6354)
+++ trunk/tools/unoconv/unoconv 2008-06-11 23:21:52 UTC (rev 6355)
@@ -244,6 +244,7 @@
self.listener = False
self.format = None
self.verbose = 0
+ self.sleep = 3
self.doctype = None
self.server = 'localhost'
self.port = '2002'
@@ -252,8 +253,8 @@
### Get options from the commandline
try:
- opts, args = getopt.getopt (args, 'c:d:f:hLlp:s:t:v',
- ['connection=', 'doctype=', 'format=', 'help', 'listener', 'port=', 'server=', 'show', 'stdout', 'verbose', 'version'] )
+ opts, args = getopt.getopt (args, 'c:d:f:hLlp:s:S:t:v',
+ ['connection=', 'doctype=', 'format=', 'help', 'listener', 'port=', 'server=', 'sleep=', 'show', 'stdout', 'verbose', 'version'] )
except getopt.error, exc:
print 'unoconv: %s, try unoconv -h for a list of all the options' % str(exc)
sys.exit(255)
@@ -278,6 +279,8 @@
self.port = arg
elif opt in ['-s', '--server']:
self.server = arg
+ elif opt in ['-S', '--sleep']:
+ self.sleep = int(arg)
elif opt in ['--stdout']:
self.stdout = True
elif opt in ['-v', '--verbose']:
@@ -344,13 +347,14 @@
unoconv options:
-c, --connection=string use a custom connection string
-d, --doctype=type specify document type
- (document, graphics, presentation, spreadsheet)
+ (document, graphics, presentation, spreadsheet)
-f, --format=format specify the output format
-l, --listener start a listener to use by unoconv clients
-p, --port specify the port (default: 2002)
- to be used by client or listener
+ to be used by client or listener
-s, --server specify the server address (default: localhost)
- to be used by client or listener
+ to be used by client or listener
+ -S, --sleep=secs sleep longer in case OpenOffice loads too slow
--show list the available output formats
--stdout write output to stdout
-v, --verbose be more and more verbose
@@ -376,7 +380,7 @@
error(2, "Trying to launch our own listener using %s." % bin)
try:
oopid = os.spawnvp(os.P_NOWAIT, bin, [bin, "-nologo", "-nodefault", "-headless", "-accept=%s" % op.connection]);
- time.sleep(1)
+ time.sleep(op.sleep)
unocontext = resolver.resolve("uno:%s" % op.connection)
break
except Exception, e:
More information about the svn-commits
mailing list