ragflow/api/utils
chrysanthemum-boy 72384b191d
Add .doc file parser. (#497)
### What problem does this PR solve?
Add `.doc` file parser, using tika.
```
pip install tika
```
```
from tika import parser
from io import BytesIO

def extract_text_from_doc_bytes(doc_bytes):
    file_like_object = BytesIO(doc_bytes)
    parsed = parser.from_buffer(file_like_object)
    return parsed["content"]
```
### Type of change

- [x] New Feature (non-breaking change which adds functionality)

---------

Co-authored-by: chrysanthemum-boy <fannc@qq.com>
2024-04-23 15:31:43 +08:00
..
__init__.py apply pep8 formalize (#155) 2024-03-27 11:33:46 +08:00
api_utils.py refine error response, add set api-key MD (#178) 2024-03-31 19:09:42 +08:00
file_utils.py Add .doc file parser. (#497) 2024-04-23 15:31:43 +08:00
log_utils.py refine log format (#312) 2024-04-11 10:13:43 +08:00
t_crypt.py apply pep8 formalize (#155) 2024-03-27 11:33:46 +08:00