[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Un antiword pour le docx



Bonjour,

J'essaye de bricoler un antiword pour le docx

#!/bin/sh

\rm -f /tmp/word/document.xml

unzip -d /tmp $1 word/document.xml

xmllint --encode UTF8 --html --htmlout /tmp/word/document.xml 2> /dev/null > /tmp/word/document.html && dillo /tmp/word/document.html

----------------------------------------------------------------------------------
Mais cela ne me donne pas totale satisfaction...
Apparemment, il n'y a pas moyen de tuber xmllint pour éviter d'écrire sur le système de fichier dans /tmp. D'autre part quand j'affiche a l'écran il y a des balises html qui restent et des caractères mal affichés.|

J'aurais voulu jouer avec un truc du genre :

unzip $1 word/document.xml | xmllint --encode UTF8 --html --htmlout 2> /dev/null | html2text -style pretty

Mais bon, si ça va pas c'est pas grave, je m'amuse là...

A bientôt

--
Benoît
 

Reply to: