Skip to main content

pydocx is a Python library for updating Microsoft Word files.

Project description

pydocx is a Python library for updating Microsoft Word files.

Installation

pip install pymdocx

Usage

import os

from pymdocx.common.utils import get_doc
from pymdocx.doc.paragraph import merge_paragraph_comment_revision
from pymdocx.doc.table import merge_table_comment_revision

DIR_PATH = './../data/test_table'

# merge_docx
doc_o_path = os.path.join(DIR_PATH, 'table.docx')
doc_a_path = os.path.join(DIR_PATH, 'table_a.docx')
doc_b_path = os.path.join(DIR_PATH, 'table_b.docx')
doc_o = get_doc(doc_o_path)
doc_a = get_doc(doc_a_path)
doc_b = get_doc(doc_b_path)
merge_paragraph_comment_revision(doc_o, [doc_a, doc_b])
merge_table_comment_revision(doc_o, [doc_a, doc_b])
doc_o.save('table_new.docx')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pymdocx-0.3.8.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pymdocx-0.3.8-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file pymdocx-0.3.8.tar.gz.

File metadata

  • Download URL: pymdocx-0.3.8.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for pymdocx-0.3.8.tar.gz
Algorithm Hash digest
SHA256 2eba8096a95db71f9daa689d448db27d823c72e425929f928175f2328d41c2f4
MD5 2fc98c953909a6eb8ba1a710c7d5575a
BLAKE2b-256 df2a5d46b557b22e2e24d3055d54d1d222088efac1552152d09ff535bece1798

See more details on using hashes here.

File details

Details for the file pymdocx-0.3.8-py3-none-any.whl.

File metadata

  • Download URL: pymdocx-0.3.8-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for pymdocx-0.3.8-py3-none-any.whl
Algorithm Hash digest
SHA256 caee1118f0ac3468c161affdb37bfe7f8907caf8f543c2581cc1a90b918fab5a
MD5 11f09f9be5038b7d320fd5b891d33597
BLAKE2b-256 b8c9cec4e41c484cd4009a49b36c139d237c84521825126f8972d671614f496b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page