Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
10 lines (8 sloc) 271 Bytes
import glob
from unidecode import unidecode
from sh import catdoc
for f in glob.glob('docs/*.doc'):
e = catdoc(f)
s = unicode(e.stdout, 'utf-8', errors='ignore')
cd = unidecode(s)
open(f.replace('docs/', 'text/').replace('.doc', '.txt'), 'w+').write(cd)