また修正点を見つけた。
estfxmsotohtmlにある「UNKNOWN FORMAT」を検索してみたら10,000件以上出てきた。
見るとそれは拡張子が大文字のファイルだった。(勿論XLS、DOCそれにPPTファイル)
大文字小文字が区別されている。当然といえば当然だった・・・
とりあえずこんな感じで対応してみた。
/usr/local/share/hyperestraier/filter/estfxmsotohtml

# output the result
case “$infile” in
*.[Dd][Oo][Cc])
wvWare --charset=UTF-8 --nographics “$infile” 2> “/dev/null” | output
;;
*.[Xx][Ll][Ss])
xlhtml “$infile” | perl -pe ‘s”

]*>( )*

n””g’ | grep -v ‘

‘ 2> “/dev/null” | output
;;
*.[Pp][Pp][Tt])
ppthtml “$infile” 2> “/dev/null” | output
;;
*)
printf ‘

!!! UNKNOWN FORMAT !!!

n’ | output
;;
esac

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です