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.6.tar.gz (7.6 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.6-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pymdocx-0.3.6.tar.gz
Algorithm Hash digest
SHA256 c26db369e1f3d608d5ecc964a5fd9c55f4b77a92cbc3dd16e88e33a7d35a265a
MD5 f5aafdddcd2f209635993dc53720d041
BLAKE2b-256 b50c35cda8a25a174587607ff1ff21d086d4d0e3e1673c1db7ba8312fb07d120

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pymdocx-0.3.6-py3-none-any.whl
Algorithm Hash digest
SHA256 9d6f573044fae403ccac3ce20880c5f0cf47db818813ef5044a15aabc1944d10
MD5 94f6666d08412038aa383a0f995af52a
BLAKE2b-256 8f7eb6d7a62b2cc0a751c1854a2a2958160fa93daedf9bf1051c93cb9d9001aa

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