LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-25-2011, 01:15 AM   #1
zoghbi
LQ Newbie
 
Registered: Dec 2011
Posts: 9

Rep: Reputation: Disabled
Lightbulb 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
 
Old 12-25-2011, 06:19 AM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
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.

Last edited by David the H.; 12-25-2011 at 06:21 AM. Reason: addendum
 
Old 12-25-2011, 02:16 PM   #3
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,420

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
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
 
Old 12-25-2011, 03:26 PM   #4
zoghbi
LQ Newbie
 
Registered: Dec 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
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
 
Old 12-25-2011, 03:34 PM   #5
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,420

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
Hello zoghbi,

If you found our posts helpful, please don't forget to give your feedback and reputation....
 
Old 12-26-2011, 03:49 AM   #6
zoghbi
LQ Newbie
 
Registered: Dec 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
of course Satyaveer Arya, thanks million times,
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Command line text file viewing and editing - .odt etc. mitchellray Linux - Newbie 1 04-14-2009 03:41 PM
convert odt or .doc into html linuxmandrake Linux - Software 6 02-23-2008 03:48 AM
convert doc to pdf in command line yumener Linux - Software 4 04-28-2006 08:23 AM
command line utility to convert between formats like .doc, .sxw, .rtf and others? bigtpumped Linux - Software 1 09-12-2005 09:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration