LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to convert html to odt or doc using linux command line? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-convert-html-to-odt-or-doc-using-linux-command-line-920426/)

zoghbi 12-25-2011 01:15 AM

How to convert html to odt or doc using linux command line?
 
hi everybody
I need to convert a lot of html files to text formats (odt,doc ...) using command line because i need to use shell script to convert all my files in one time.

thanks in advance

David the H. 12-25-2011 06:19 AM

openoffice/libreoffice include batch-conversion ability.

Code:

libreoffice --headless --convert-to odt *.html
I don't know how well it handles the conversion though.

There are more options for converting to regular text. html2text, for example. Search your distro's repositories.

Satyaveer Arya 12-25-2011 02:16 PM

Hey zoghbi,

To convert to odt it's pretty easy after installing pandoc.

Quote:

#pandoc -o output.html input.txt
Or you can like:

Quote:

#abiword --to=doc filename.odt

zoghbi 12-25-2011 03:26 PM

thanks very much David the H, and Satyaveer Arya
the two method works well,
pandoc convert with a best quality directly to .doc or .docx

Satyaveer Arya 12-25-2011 03:34 PM

Hello zoghbi,

If you found our posts helpful, please don't forget to give your feedback and reputation....

zoghbi 12-26-2011 03:49 AM

of course Satyaveer Arya, thanks million times,


All times are GMT -5. The time now is 11:39 AM.