/[hyperestraier]/upstream/0.5.0/filter/estfxmsotohtml
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /upstream/0.5.0/filter/estfxmsotohtml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (show annotations)
Fri Jul 29 21:52:03 2005 UTC (18 years, 10 months ago) by dpavlin
File size: 1202 byte(s)
import of HyperEstraier 0.5.0

1 #! /bin/sh
2
3 #================================================================
4 # extfxmsotohtml
5 # Convert MS-Word, MS-Excel, or MS-PowerPoint into HTML
6 #================================================================
7
8
9 # set variables
10 PATH="$PATH:/usr/local/bin:$HOME/bin:." ; export PATH
11 progname="estfxmsotohtml"
12
13
14 # check arguments
15 if [ $# -lt 1 ]
16 then
17 printf '%s: usage: %s infile [outfile]\n' "$progname" "$progname" 1>&2
18 exit 1
19 fi
20 infile="$1"
21 outfile="$2"
22 if [ -n "$ESTORIGFILE" ] && [ -f "$ESTORIGFILE" ]
23 then
24 infile="$ESTORIGFILE"
25 fi
26
27
28 # check the input
29 if [ "!" -f "$infile" ]
30 then
31 printf '%s: %s: no such file\n' "$progname" "$infile" 1>&2
32 exit 1
33 fi
34
35
36 # initialize the output file
37 if [ -n "$outfile" ]
38 then
39 rm -f "$outfile"
40 fi
41
42
43 # function to output
44 output(){
45 if [ -n "$outfile" ]
46 then
47 cat >> "$outfile"
48 else
49 cat
50 fi
51 }
52
53
54 # output the result
55 case "$infile" in
56 *.doc)
57 wvWare --charset=UTF-8 --nographics "$infile" 2> "/dev/null" | output
58 ;;
59 *.xls)
60 xlhtml "$infile" 2> "/dev/null" | output
61 ;;
62 *.ppt)
63 ppthtml "$infile" 2> "/dev/null" | output
64 ;;
65 *)
66 printf '<div>!!! UNKNOWN FORMAT !!!</div>\n' | output
67 ;;
68 esac
69
70
71 # exit normally
72 exit 0
73
74
75
76 # END OF FILE

Properties

Name Value
svn:executable

  ViewVC Help
Powered by ViewVC 1.1.26