#!/bin/sh # For debugging - see it go #set -x #exec 2> /tmp/mydebugfile$$.out # Program Oxml Displays .docx files in OpenOffice # Companion programs Oxmlppt, Oxmlxls # application/vnd.openxmlformats-officedocument.wordprocessingml.document docx # 1/25/2008 D R Forrest # 4/16/2008 Removes converted filename that uses .odt extension # Copyright (c) 2008 David R. Forrest (Forrest) # # Permission to use, copy, modify, and distribute this material # for any purpose and without fee is hereby granted, provided # that the above copyright notice and this permission notice # appear in all copies, and that the name of Forrest not be # used in advertising or publicity pertaining to this # material without the specific, prior written permission # of an authorized representative of Forrest. FORREST # MAKES NO REPRESENTATIONS ABOUT THE ACCURACY OR SUITABILITY # OF THIS MATERIAL FOR ANY PURPOSE. IT IS PROVIDED "AS IS", # WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. ( [ "$SSH_CONNECTION" ] ) && (echo "Remote display - try save" && sleep 5 && exit) # Uses OdfConverter (this script x86_64) from: # http://www.oooninja.com/2008/01/convert-openxml-docx-etc-in-linux-using.html echo "Processing - May take a minute......" OUTFILE=${1%%.*}.odt # Get converter output file name for ooffice /usr/local/bin/OdfConverter /docx2odt /i "$1" >/dev/null 2>&1 ooffice "$OUTFILE" rm "$OUTFILE"