Re: counting words in word document works in python but not in django

2017-02-15 Thread agoulouzegouna
Tnak you very much. I tried the first version. and added the following code to my view when save. And it works. I am very grateful. Thanks a lot pathy = submitDoc.uploadDoc.path solution= get_docx_text(pathy) counted = len(solution.split()) On Wednesday, February 15,

RE: counting words in word document works in python but not in django

2017-02-15 Thread Matthew Pava
You may want to consider a different package or python function. Here is a way to extract only the text from a docx without using python-docx: http://etienned.github.io/posts/extract-text-from-word-docx-simply/ There is also another script that appears to be more accurate by taking headers and fo