[Tutor] adapting a converter openoffice
Tim Michelsen
timmichelsen at gmx-topmail.de
Fri Jul 27 00:44:50 CEST 2007
> When you say nothing happemed I assume you mean the script
> never terminated?
Yes, you are right. it does not terminate and only blocks the screen.
As stated on the site the script needs some special parameters of
Openoffice. Therefore, until I step further, I wrap it around a shell
script that I will put in my PATH:
#!/bin/bash
###licence
##which licence applies for this script? If not changed it will be
released under GPL:
#This shell script 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; either version 2 of the License, or (at
your option) any later version.
#
#This shell script 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 shell script ; if not, write to the
#Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA
#or read the text online: http://www.gnu.org/licenses/gpl.txt
###script description
##convert from/to openoffice document formats using a script from
##http://www.artofsolving.com/opensource/pyodconverter
##see also: http://www.linux.com/articles/61713
#start OpenOffice as a service
soffice -headless -accept="socket,port=8100;urp;"
#get variables
# @1 = SOURCE
# @2 = DESTINATION
#convert command
# /opt/local/pyodconverter $SOURCE $DESTINATION
cd /opt/local/pyodconverter/
python ./DocumentConverter.py $1 $2
exit
Maybe one day I will be able to do this in python using pyodconverter as
a class...
More information about the Tutor
mailing list