From c814b12b166e8bdc4c64be9cf57dff595efa7f55 Mon Sep 17 00:00:00 2001 From: Luke Plant Date: Mon, 5 Jan 2004 16:08:12 +0000 Subject: [PATCH] tools/textviewer.sh o added a viewer for OpenOffice writer files (ooo2txt) --- tools/textviewer.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tools/textviewer.sh b/tools/textviewer.sh index 85d3800bc..075c02512 100644 --- a/tools/textviewer.sh +++ b/tools/textviewer.sh @@ -40,6 +40,10 @@ # Change Log # # 2004-01-05 +# - added matcher and action for OpenOffice Writer documents +# (requires ooo2txt) +# +# 2004-01-05 # - changed page width parameter for antiword # - fixed matcher for 'diffs' # - added a matcher and action for bzip2 - bzip2 files @@ -98,6 +102,7 @@ case "$1" in *.diff) TYPE=TEXT ;; *.txt) TYPE=TEXT ;; *.rtf) TYPE=RTF ;; + *.sxw) TYPE=OOWRITER ;; esac if [ "$TYPE" == "" ] @@ -155,5 +160,12 @@ case $TYPE in }; antiword -w 72 "$1" ;; + OOWRITER) which ooo2txt > /dev/null 2>&1 || + { + echo "Program 'ooo2txt' for converting OpenOffice Writer files not files not found" >&2 + exit 1 + }; + ooo2txt "$1" ;; + *) echo "Unsupported file type \"$FILETYPE\", cannot display.";; esac -- 2.25.1