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 Fri 24 Oct 2014, 06:33
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 [2 Posts]  
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
Subject description: 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 from previous:   Sort by:   
Page 1 of 1 [2 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0414s ][ Queries: 11 (0.0063s) ][ GZIP on ]