docxpy-0.8.5
توضیحات
A pure python-based utility to extract text, hyperlinks and imagesfrom docx files.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | docxpy-0.8.5 |
| نام | docxpy |
| نسخه کتابخانه | 0.8.5 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Ankush Shah, Yalei Du |
| ایمیل نویسنده | yaleidu@163.com |
| آدرس صفحه اصلی | https://github.com/badbye/docxpy |
| آدرس اینترنتی | https://pypi.org/project/docxpy/ |
| مجوز | UNKNOWN |
docxpy
======
|image0| |PyPI|
This project is forked from
`ankushshah89/python-docx2txt <https://github.com/ankushshah89/python-docx2txt/pull/10/files>`__.
A new feature is added: extract the hyperlinks and its corresponding
texts.
It is a pure python-based utility to extract text from docx files. The
code is taken and adapted from
`python-docx <https://github.com/python-openxml/python-docx>`__. It can
however also extract **text** from header, footer and **hyperlinks**. It
can now also extract **images**.
How to install?
---------------
.. code:: bash
pip install docxpy
How to run?
-----------
a. From command line:
.. code:: bash
# extract text
docx2txt file.docx
# extract text and images
docx2txt -i /tmp/img_dir file.docx
b. From python:
.. code:: python
import docxpy
file = 'file.docx'
# extract text
text = docxpy.process(file)
# extract text and write images in /tmp/img_dir
text = docxpy.process(file, "/tmp/img_dir")
# if you want the hyperlinks
doc = docxpy.DOCReader(file)
doc.process() # process file
hyperlinks = doc.data['links']
.. |image0| image:: https://travis-ci.org/badbye/docxpy.svg?branch=master
.. |PyPI| image:: https://img.shields.io/pypi/pyversions/scrapy-corenlp.svg?style=flat-square
نحوه نصب
نصب پکیج whl docxpy-0.8.5:
pip install docxpy-0.8.5.whl
نصب پکیج tar.gz docxpy-0.8.5:
pip install docxpy-0.8.5.tar.gz