Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 21 Dec 2014, 20:04
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
Commandline script for converting .doc to .txt
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
toowoombalinux

Joined: 15 Feb 2010
Posts: 95

PostPosted: Thu 08 Apr 2010, 20:23    Post_subject:  Commandline script for converting .doc to .txt
Sub_title: If Abiword is installed
 

G'day,
Very basic script that need to be in the same directory as the .doc file. Oh and Abiword needs to be installed.

Code:
#!/bin/sh
for FILENAME in *.doc
do :
  BASEFILENAME=`basename $FILENAME .doc`
  abiword --to=$BASEFILENAME.abw $BASEFILENAME.doc
done
for FILENAME in *.abw
do :
  BASEFILENAME=`basename $FILENAME .abw`
  abiword --to=$BASEFILENAME.txt $BASEFILENAME.abw
done


For a cleaner txt file (which you may use with speech synth) I found it better to convert to .abw then convert .abw to .txt.

Hopes this helps.
Cheers
Martin

_________________
Toowoomba Linux Community
http://groups.google.com/group/toowoombalinux
Puppy Linux 301 - KDE 3.5.8
Back to top
View user's profile Send_private_message 
aragon

Joined: 15 Oct 2007
Posts: 1698
Location: Germany

PostPosted: Fri 09 Apr 2010, 10:08    Post_subject:  

you might want to also look at

antiword: http://www.winfield.demon.nl/

and

docx2txt: http://docx2txt.sourceforge.net/

aragon

_________________
PUPPY SEARCH: http://wellminded.com/puppy/pupsearch.html
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0412s ][ Queries: 12 (0.0058s) ][ GZIP on ]