10 STAROFFICE_REGEXP
='\.(sxw|sdw|stw|sxc|stc|sxi|sti|sxd|std||sxm||sxg)$'
12 staroffice_console
() {
15 if [ -n "${is_view}" ]; then
19 tmp
=`mktemp -d ${TMPDIR:-/tmp}/%p.XXXXXX`
21 soffice2html.pl
"${filename}"
22 elinks
${is_view} content.html
31 ps2ascii
"${MC_EXT_FILENAME}"
34 pdftotext
-layout -nopgbrk "${MC_EXT_FILENAME}" -
37 if [ ` echo "${MC_EXT_FILENAME}" | grep -c "${STAROFFICE_REGEXP}"` -ne 0 ]; then
38 staroffice_console
"${MC_EXT_FILENAME}" "view"
40 odt2txt
"${MC_EXT_FILENAME}"
44 which wvHtml
>/dev
/null
2>&1 &&
46 tmp
=`mktemp -d ${TMPDIR:-/tmp}/%p.XXXXXX`
47 wvHtml
"${MC_EXT_FILENAME}" --targetdir="$tmp" page.html
48 elinks
-dump "$tmp/page.html"
51 antiword
-t "${MC_EXT_FILENAME}" || \
52 catdoc
-w "${MC_EXT_FILENAME}" || \
53 word2x
-f text
"${MC_EXT_FILENAME}" - || \
54 strings "${MC_EXT_FILENAME}"
57 which xlHtml
>/dev
/null
2>&1 && {
58 tmp
=`mktemp -d ${TMPDIR:-/tmp}/%p.XXXXXX`
59 xlhtml
-a "${MC_EXT_FILENAME}" > "$tmp/page.html"
60 elinks
-dump "$tmp/page.html"
63 xls2csv
"${MC_EXT_FILENAME}" || \
64 strings "${MC_EXT_FILENAME}"
67 dvi2tty
"${MC_EXT_FILENAME}"
70 djvused
-e print-pure-txt
"${MC_EXT_FILENAME}"
82 if [ -n "$DISPLAY" ]; then
83 (gv
"${MC_EXT_FILENAME}" &)
85 ps2ascii
"${MC_EXT_FILENAME}" |
${PAGER:-more}
89 if [ -n "$DISPLAY" ]; then
90 (xpdf
"${MC_EXT_FILENAME}" &)
92 pdftotext
-layout -nopgbrk "${MC_EXT_FILENAME}" - |
${PAGER:-more}
94 #(acroread "${MC_EXT_FILENAME}" &)
95 #(ghostview "${MC_EXT_FILENAME}" &)
98 if [ -n "$DISPLAY" ]; then
99 (ooffice
"${MC_EXT_FILENAME}" &)
101 if [ ` echo "${MC_EXT_FILENAME}" | grep -c "${STAROFFICE_REGEXP}"` -ne 0 ]; then
102 staroffice_console
"${MC_EXT_FILENAME}"
104 odt2txt
"${MC_EXT_FILENAME}" |
${PAGER:-more}
109 (abiword
"${MC_EXT_FILENAME}" &)
112 if [ -n "$DISPLAY" ]; then
113 (abiword
"${MC_EXT_FILENAME}" >/dev
/null
2>&1 &)
115 tmp
=`mktemp -d ${TMPDIR:-/tmp}/%p.XXXXXX`
116 wvHtml
"${MC_EXT_FILENAME}" --targetdir="$tmp" page.html
-1
117 elinks
"$tmp/page.html"
122 if [ -n "$DISPLAY" ]; then
123 (gnumeric
"${MC_EXT_FILENAME}" >/dev
/null
2>&1 &)
125 tmp
=`mktemp -d ${TMPDIR:-/tmp}/%p.XXXXXX`
126 xlhtml
-a "${MC_EXT_FILENAME}" > "$tmp/page.html"
127 elinks
"$tmp/page.html"
132 if [ -n "$DISPLAY" ]; then
133 (ooffice
%f
>/dev
/null
2>&1 &)
135 tmp
=`mktemp -d ${TMPDIR:-/tmp}/%p.XXXXXX`
136 ppthtml
%f
> "$tmp/page.html"
137 elinks
"$tmp/page.html"
142 fmclient
-f "${MC_EXT_FILENAME}"
145 if [ -n "$DISPLAY" ]; then
146 (xdvi
"${MC_EXT_FILENAME}" &)
148 dvisvga
"${MC_EXT_FILENAME}" || \
149 dvi2tty
"${MC_EXT_FILENAME}" |
${PAGER:-more}
153 djview
"${MC_EXT_FILENAME}" &
162 do_view_action
"${filetype}"
165 xdg-open
"${MC_EXT_FILENAME}" 2>/dev
/null || \
166 do_open_action
"${filetype}"